sa-jdi

    byte[] res = new byte[2];
    res[0] = ((byte)(value >> '\b' & 0xFF));
    res[1] = ((byte)value);
    if (!isBigEndian) {
      byteSwap(res);
    }
    return res;
  }
  
  public byte[] jdoubleToData(double value)
  {
    return jlongToData(Double.doubleToLongBits(value));
  }
  
  public byte[] jfloatToData(float value)
  {
    return jintToData(Float.floatToIntBits(value));
  }
  
  public byte[] jintToData(int value)
  {
    byte[] res = new byte[4];
    for (int i = 0; i < 4; i++)
    {
      res[(3 - i)] = ((byte)(value & 0xFF));
      value >>>= 8;
    }
    if (!isBigEndian) {
      byteSwap(res);
    }
    return res;
  }
  
  public byte[] jlongToData(long value)
  {
    byte[] res = new byte[8];
    for (int i = 0; i < 8; i++)
    {
      res[(7 - i)] = ((byte)(int)(value & 0xFF));
      value >>>= 8;
    }
    if (!isBigEndian) {
      byteSwap(res);
    }
    return res;
  }
  
  public byte[] jshortToData(short value)
  {
    byte[] res = new byte[2];
    res[0] = ((byte)(value >> 8 & 0xFF));
    res[1] = ((byte)value);
    if (!isBigEndian) {
      byteSwap(res);
    }
    return res;
  }
  
  public byte[] cIntegerToData(long longNumBytes, long value)
  {
    int numBytes = (int)longNumBytes;
    byte[] res = new byte[numBytes];
    for (int i = 0; i < numBytes; i++)
    {
      res[(numBytes - i - 1)] = ((byte)(int)(value & 0xFF));
      value >>>= 8;
    }
    if (!isBigEndian) {
      byteSwap(res);
    }
    return res;
  }
  
  private void checkDataContents(byte[] data, long len)
  {
    if (data.length != (int)len) {
      throw new InternalError("Bug in Win32Debugger");
    }
  }
  
  private void byteSwap(byte[] data)
  {
    for (int i = 0; i < data.length / 2; i++)
    {
      int altIndex = data.length - i - 1;
      byte t = data[altIndex];
      data[altIndex] = data[i];
      data[i] = t;
    }
  }
  
  private long rawDataToJLong(byte[] data)
  {
    long addr = 0L;
    for (int i = 0; i < data.length; i++)
    {
      addr <<= 8;
      addr |= data[i] & 0xFF;
    }
    return addr;
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.debugger.DebuggerUtilities
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.debugger.dummy;

import java.io.PrintStream;
import sun.jvm.hotspot.debugger.Address;
import sun.jvm.hotspot.debugger.DebuggerException;
import sun.jvm.hotspot.debugger.NotInHeapException;
import sun.jvm.hotspot.debugger.OopHandle;
import sun.jvm.hotspot.debugger.UnalignedAddressException;
import sun.jvm.hotspot.debugger.UnmappedAddressException;

class DummyAddress
  implements Address
{
  protected DummyDebugger debugger;
  protected long addr;
  private static final long badLong = 3131947710L;
  private static final double badDouble = 1.23456D;
  
  DummyAddress(DummyDebugger debugger, long addr)
  {
    this.debugger = debugger;
    this.addr = addr;
  }
  
  public boolean equals(Object arg)
  {
    if (arg == null) {
      return false;
    }
    if (!(arg instanceof DummyAddress)) {
      return false;
    }
    return addr == addr;
  }
  
  public int hashCode()
  {
    return (int)addr;
  }
  
  public String toString()
  {
    return debugger.addressToString(this);
  }
  
  public long getCIntegerAt(long offset, long numBytes, boolean isUnsigned)
    throws UnalignedAddressException, UnmappedAddressException
  {
    return 3131947710L;
  }
  
  public Address getAddressAt(long offset)
    throws UnalignedAddressException, UnmappedAddressException
  {
    return new DummyAddress(debugger, 3131947710L);
  }
  
  public Address getCompOopAddressAt(long offset)
    throws UnalignedAddressException, UnmappedAddressException
  {
    return new DummyAddress(debugger, 3131947710L);
  }
  
  public boolean getJBooleanAt(long offset)
    throws UnalignedAddressException, UnmappedAddressException
  {
    return false;
  }
  
  public byte getJByteAt(long offset)
    throws UnalignedAddressException, UnmappedAddressException
  {
    return -66;
  }
  
  public char getJCharAt(long offset)
    throws UnalignedAddressException, UnmappedAddressException
  {
    return 47806;
  }
  
  public double getJDoubleAt(long offset)
    throws UnalignedAddressException, UnmappedAddressException
  {
    return 1.23456D;
  }
  
  public float getJFloatAt(long offset)
    throws UnalignedAddressException, UnmappedAddressException
  {
    return 1.23456F;
  }
  
  public int getJIntAt(long offset)
    throws UnalignedAddressException, UnmappedAddressException
  {
    return -1163019586;
  }
  
  public long getJLongAt(long offset)
    throws UnalignedAddressException, UnmappedAddressException
  {
    return 3131947710L;
  }
  
  public short getJShortAt(long offset)
    throws UnalignedAddressException, UnmappedAddressException
  {
    return 47806;
  }
  
  public OopHandle getOopHandleAt(long offset)
    throws UnalignedAddressException, UnmappedAddressException, NotInHeapException
  {
    return new DummyOopHandle(debugger, 3131947710L);
  }
  
  public OopHandle getCompOopHandleAt(long offset)
    throws UnalignedAddressException, UnmappedAddressException, NotInHeapException
  {
    return new DummyOopHandle(debugger, 3131947710L);
  }
  
  public void setCIntegerAt(long offset, long numBytes, long value)
  {
    throw new DebuggerException("Unimplemented");
  }
  
  public void setAddressAt(long offset, Address value)
  {
    throw new DebuggerException("Unimplemented");
  }
  
  public void setJBooleanAt(long offset, boolean value)
    throws UnmappedAddressException, UnalignedAddressException
  {
    throw new DebuggerException("Unimplemented");
  }
  
  public void setJByteAt(long offset, byte value)
    throws UnmappedAddressException, UnalignedAddressException
  {
    throw new DebuggerException("Unimplemented");
  }
  
  public void setJCharAt(long offset, char value)
    throws UnmappedAddressException, UnalignedAddressException
  {
    throw new DebuggerException("Unimplemented");
  }
  
  public void setJDoubleAt(long offset, double value)
    throws UnmappedAddressException, UnalignedAddressException
  {
    throw new DebuggerException("Unimplemented");
  }
  
  public void setJFloatAt(long offset, float value)
    throws UnmappedAddressException, UnalignedAddressException
  {
    throw new DebuggerException("Unimplemented");
  }
  
  public void setJIntAt(long offset, int value)
    throws UnmappedAddressException, UnalignedAddressException
  {
    throw new DebuggerException("Unimplemented");
  }
  
  public void setJLongAt(long offset, long value)
    throws UnmappedAddressException, UnalignedAddressException
  {
    throw new DebuggerException("Unimplemented");
  }
  
  public void setJShortAt(long offset, short value)
    throws UnmappedAddressException, UnalignedAddressException
  {
    throw new DebuggerException("Unimplemented");
  }
  
  public void setOopHandleAt(long offset, OopHandle value)
    throws UnmappedAddressException, UnalignedAddressException
  {
    throw new DebuggerException("Unimplemented");
  }
  
  public Address addOffsetTo(long offset)
    throws UnsupportedOperationException
  {
    long value = addr + offset;
    if (value == 0L) {
      return null;
    }
    return new DummyAddress(debugger, value);
  }
  
  public OopHandle addOffsetToAsOopHandle(long offset)
    throws UnsupportedOperationException
  {
    long value = addr + offset;
    if (value == 0L) {
      return null;
    }
    return new DummyOopHandle(debugger, value);
  }
  
  public long minus(Address arg)
  {
    if (arg == null) {
      return addr;
    }
    return addr - addr;
  }
  
  public boolean lessThan(Address arg)
  {
    DummyAddress DummyArg = (DummyAddress)arg;
    if ((addr >= 0L) && (addr < 0L)) {
      return true;
    }
    if ((addr < 0L) && (addr >= 0L)) {
      return false;
    }
    return addr < addr;
  }
  
  public boolean lessThanOrEqual(Address arg)
  {
    DummyAddress DummyArg = (DummyAddress)arg;
    if ((addr >= 0L) && (addr < 0L)) {
      return true;
    }
    if ((addr < 0L) && (addr >= 0L)) {
      return false;
    }
    return addr <= addr;
  }
  
  public boolean greaterThan(Address arg)
  {
    DummyAddress DummyArg = (DummyAddress)arg;
    if ((addr >= 0L) && (addr < 0L)) {
      return false;
    }
    if ((addr < 0L) && (addr >= 0L)) {
      return true;
    }
    return addr > addr;
  }
  
  public boolean greaterThanOrEqual(Address arg)
  {
    DummyAddress DummyArg = (DummyAddress)arg;
    if ((addr >= 0L) && (addr < 0L)) {
      return false;
    }
    if ((addr < 0L) && (addr >= 0L)) {
      return true;
    }
    return addr >= addr;
  }
  
  public Address andWithMask(long mask)
    throws UnsupportedOperationException
  {
    long value = addr & mask;
    if (value == 0L) {
      return null;
    }
    return new DummyAddress(debugger, value);
  }
  
  public Address orWithMask(long mask)
    throws UnsupportedOperationException
  {
    long value = addr | mask;
    if (value == 0L) {
      return null;
    }
    return new DummyAddress(debugger, value);
  }
  
  public Address xorWithMask(long mask)
    throws UnsupportedOperationException
  {
    long value = addr ^ mask;
    if (value == 0L) {
      return null;
    }
    return new DummyAddress(debugger, value);
  }
  
  long getValue()
  {
    return addr;
  }
  
  private static void check(boolean arg, String failMessage)
  {
    if (!arg)
    {
      System.err.println(failMessage + ": FAILED");
      System.exit(1);
    }
  }
  
  public static void main(String[] args)
  {
    DummyAddress p1 = new DummyAddress(null, 9223372036854775792L);
    DummyAddress p2 = (DummyAddress)p1.addOffsetTo(10L);
    DummyAddress n1 = (DummyAddress)p2.addOffsetTo(10L);
    DummyAddress n2 = (DummyAddress)n1.addOffsetTo(10L);
    
    check(p1.lessThan(p2), "lessThan 1");
    check(p1.lessThan(n1), "lessThan 2");
    check(p1.lessThan(n2), "lessThan 3");
    check(p2.lessThan(n1), "lessThan 4");
    check(p2.lessThan(n2), "lessThan 5");
    check(n1.lessThan(n2), "lessThan 6");
    
    check(!p1.lessThan(p1), "lessThan 7");
    check(!p2.lessThan(p2), "lessThan 8");
    check(!n1.lessThan(n1), "lessThan 9");
    check(!n2.lessThan(n2), "lessThan 10");
    
    check(!p2.lessThan(p1), "lessThan 11");
    check(!n1.lessThan(p1), "lessThan 12");
    check(!n2.lessThan(p1), "lessThan 13");
    check(!n1.lessThan(p2), "lessThan 14");
    check(!n2.lessThan(p2), "lessThan 15");
    check(!n2.lessThan(n1), "lessThan 16");
    
    check(p1.lessThanOrEqual(p1), "lessThanOrEqual 1");
    check(p2.lessThanOrEqual(p2), "lessThanOrEqual 2");
    check(n1.lessThanOrEqual(n1), "lessThanOrEqual 3");
    check(n2.lessThanOrEqual(n2), "lessThanOrEqual 4");
    
    check(p1.lessThanOrEqual(p2), "lessThanOrEqual 5");
    check(p1.lessThanOrEqual(n1), "lessThanOrEqual 6");
    check(p1.lessThanOrEqual(n2), "lessThanOrEqual 7");
    check(p2.lessThanOrEqual(n1), "lessThanOrEqual 8");
    check(p2.lessThanOrEqual(n2), "lessThanOrEqual 9");
    check(n1.lessThanOrEqual(n2), "lessThanOrEqual 10");
    
    check(!p2.lessThanOrEqual(p1), "lessThanOrEqual 11");
    check(!n1.lessThanOrEqual(p1), "lessThanOrEqual 12");
    check(!n2.lessThanOrEqual(p1), "lessThanOrEqual 13");
    check(!n1.lessThanOrEqual(p2), "lessThanOrEqual 14");
    check(!n2.lessThanOrEqual(p2), "lessThanOrEqual 15");
    check(!n2.lessThanOrEqual(n1), "lessThanOrEqual 16");
    
    check(n2.greaterThan(p1), "greaterThan 1");
    check(n2.greaterThan(p2), "greaterThan 2");
    check(n2.greaterThan(n1), "greaterThan 3");
    check(n1.greaterThan(p1), "greaterThan 4");
    check(n1.greaterThan(p2), "greaterThan 5");
    check(p2.greaterThan(p1), "greaterThan 6");
    
    check(!p1.greaterThan(p1), "greaterThan 7");
    check(!p2.greaterThan(p2), "greaterThan 8");
    check(!n1.greaterThan(n1), "greaterThan 9");
    check(!n2.greaterThan(n2), "greaterThan 10");
    
    check(!p1.greaterThan(n2), "greaterThan 11");
    check(!p2.greaterThan(n2), "greaterThan 12");
    check(!n1.greaterThan(n2), "greaterThan 13");
    check(!p1.greaterThan(n1), "greaterThan 14");
    check(!p2.greaterThan(n1), "greaterThan 15");
    check(!p1.greaterThan(p2), "greaterThan 16");
    
    check(p1.greaterThanOrEqual(p1), "greaterThanOrEqual 1");
    check(p2.greaterThanOrEqual(p2), "greaterThanOrEqual 2");
    check(n1.greaterThanOrEqual(n1), "greaterThanOrEqual 3");
    check(n2.greaterThanOrEqual(n2), "greaterThanOrEqual 4");
    
    check(n2.greaterThanOrEqual(p1), "greaterThanOrEqual 5");
    check(n2.greaterThanOrEqual(p2), "greaterThanOrEqual 6");
    check(n2.greaterThanOrEqual(n1), "greaterThanOrEqual 7");
    check(n1.greaterThanOrEqual(p1), "greaterThanOrEqual 8");
    check(n1.greaterThanOrEqual(p2), "greaterThanOrEqual 9");
    check(p2.greaterThanOrEqual(p1), "greaterThanOrEqual 10");
    
    check(!p1.greaterThanOrEqual(n2), "greaterThanOrEqual 11");
    check(!p2.greaterThanOrEqual(n2), "greaterThanOrEqual 12");
    check(!n1.greaterThanOrEqual(n2), "greaterThanOrEqual 13");
    check(!p1.greaterThanOrEqual(n1), "greaterThanOrEqual 14");
    check(!p2.greaterThanOrEqual(n1), "greaterThanOrEqual 15");
    check(!p1.greaterThanOrEqual(p2), "greaterThanOrEqual 16");
    
    System.err.println("DummyAddress: all tests passed successfully.");
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.debugger.dummy.DummyAddress
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.debugger.dummy;

import java.util.List;
import sun.jvm.hotspot.debugger.Address;
import sun.jvm.hotspot.debugger.DebuggerBase;
import sun.jvm.hotspot.debugger.DebuggerException;
import sun.jvm.hotspot.debugger.MachineDescription;
import sun.jvm.hotspot.debugger.OopHandle;
import sun.jvm.hotspot.debugger.ReadResult;
import sun.jvm.hotspot.debugger.ThreadProxy;
import sun.jvm.hotspot.debugger.cdbg.CDebugger;
import sun.jvm.hotspot.utilities.PlatformInfo;

public class DummyDebugger
  extends DebuggerBase
{
  private MachineDescription machDesc;
  
  public DummyDebugger(MachineDescription machDesc)
  {
    this.machDesc = machDesc;
  }
  
  public boolean hasProcessList()
    throws DebuggerException
  {
    return false;
  }
  
  public List getProcessList()
    throws DebuggerException
  {
    return null;
  }
  
  public void attach(int processID)
    throws DebuggerException
  {}
  
  public void attach(String executableName, String coreFileName)
    throws DebuggerException
  {}
  
  public boolean detach()
  {
    return true;
  }
  
  public Address parseAddress(String addrStr)
  {
    String s = addrStr.trim();
    if (!s.startsWith("0x")) {
      throw new NumberFormatException(addrStr);
    }
    long l = 0L;
    for (int i = 2; i < s.length(); i++)
    {
      int val = charToNibble(s.charAt(i));
      l <<= 4;
      l |= val;
    }
    return new DummyAddress(this, l);
  }
  
  public long getAddressValue(Address addr)
  {
    if (addr == null) {
      return 0L;
    }
    return ((DummyAddress)addr).getValue();
  }
  
  public String getOS()
  {
    return PlatformInfo.getOS();
  }
  
  public String getCPU()
  {
    return PlatformInfo.getCPU();
  }
  
  public MachineDescription getMachineDescription()
    throws DebuggerException
  {
    return machDesc;
  }
  
  public boolean hasConsole()
  {
    return false;
  }
  
  public String consoleExecuteCommand(String cmd)
    throws DebuggerException
  {
    throw new DebuggerException("unimplemented");
  }
  
  public String getConsolePrompt()
    throws DebuggerException
  {
    throw new DebuggerException("unimplemented");
  }
  
  public CDebugger getCDebugger()
    throws DebuggerException
  {
    return null;
  }
  
  public Address lookup(String objectName, String symbol)
  {
    return null;
  }
  
  public OopHandle lookupOop(String objectName, String symbol)
  {
    return null;
  }
  
  public ThreadProxy getThreadForIdentifierAddress(Address addr)
  {
    return null;
  }
  
  public ThreadProxy getThreadForThreadId(long id)
  {
    return null;
  }
  
  public ReadResult readBytesFromProcess(long address, long numBytes)
    throws DebuggerException
  {
    throw new DebuggerException("Unimplemented");
  }
  
  public void writeBytesToProcess(long a, long b, byte[] buf)
    throws DebuggerException
  {
    throw new DebuggerException("Unimplemented");
  }
  
  String addressToString(DummyAddress addr)
  {
    StringBuffer buf = new StringBuffer();
    buf.append("0x");
    String val;
    String val;
    if (addr == null) {
      val = "0";
    } else {
      val = Long.toHexString(addr.getValue());
    }
    for (int i = 0; i < 2L * machDesc.getAddressSize() - val.length(); i++) {
      buf.append('0');
    }
    buf.append(val);
    return buf.toString();
  }
  
  private int charToNibble(char ascii)
    throws NumberFormatException
  {
    if ((ascii >= '0') && (ascii <= '9')) {
      return ascii - '0';
    }
    if ((ascii >= 'A') && (ascii <= 'F')) {
      return '\n' + ascii - 65;
    }
    if ((ascii >= 'a') && (ascii <= 'f')) {
      return '\n' + ascii - 97;
    }
    throw new NumberFormatException(new Character(ascii).toString());
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.debugger.dummy.DummyDebugger
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.debugger.dummy;

import sun.jvm.hotspot.debugger.Address;
import sun.jvm.hotspot.debugger.OopHandle;

class DummyOopHandle
  extends DummyAddress
  implements OopHandle
{
  DummyOopHandle(DummyDebugger debugger, long addr)
  {
    super(debugger, addr);
  }
  
  public boolean equals(Object arg)
  {
    if (arg == null) {
      return false;
    }
    if (!(arg instanceof DummyOopHandle)) {
      return false;
    }
    return addr == addr;
  }
  
  public Address addOffsetTo(long offset)
    throws UnsupportedOperationException
  {
    throw new UnsupportedOperationException("addOffsetTo not applicable to OopHandles (interior object pointers not allowed)");
  }
  
  public Address andWithMask(long mask)
    throws UnsupportedOperationException
  {
    throw new UnsupportedOperationException("andWithMask not applicable to OopHandles (i.e., anything but C addresses)");
  }
  
  public Address orWithMask(long mask)
    throws UnsupportedOperationException
  {
    throw new UnsupportedOperationException("orWithMask not applicable to OopHandles (i.e., anything but C addresses)");
  }
  
  public Address xorWithMask(long mask)
    throws UnsupportedOperationException
  {
    throw new UnsupportedOperationException("xorWithMask not applicable to OopHandles (i.e., anything but C addresses)");
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.debugger.dummy.DummyOopHandle
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.debugger.ia64;

import sun.jvm.hotspot.debugger.Address;
import sun.jvm.hotspot.debugger.ThreadContext;

public abstract class IA64ThreadContext
  implements ThreadContext
{
  public static final int GR0 = 0;
  public static final int GR1 = 1;
  public static final int GR2 = 2;
  public static final int GR3 = 3;
  public static final int GR4 = 4;
  public static final int GR5 = 5;
  public static final int GR6 = 6;
  public static final int GR7 = 7;
  public static final int GR8 = 8;
  public static final int GR9 = 9;
  public static final int GR10 = 10;
  public static final int GR11 = 11;
  public static final int GR12 = 12;
  public static final int SP = 12;
  public static final int GR13 = 13;
  public static final int GR14 = 14;
  public static final int GR15 = 15;
  public static final int GR16 = 16;
  public static final int GR17 = 17;
  public static final int GR18 = 18;
  public static final int GR19 = 19;
  public static final int GR20 = 20;
  public static final int GR21 = 21;
  public static final int GR22 = 22;
  public static final int GR23 = 23;
  public static final int GR24 = 24;
  public static final int GR25 = 25;
  public static final int GR26 = 26;
  public static final int GR27 = 27;
  public static final int GR28 = 28;
  public static final int GR29 = 29;
  public static final int GR30 = 30;
  public static final int GR31 = 31;
  public static final int INT_NATS = 32;
  public static final int PREDS = 33;
  public static final int BR0 = 34;
  public static final int BR_RP = 34;
  public static final int BR1 = 35;
  public static final int BR2 = 36;
  public static final int BR3 = 37;
  public static final int BR4 = 38;
  public static final int BR5 = 39;
  public static final int BR6 = 40;
  public static final int BR7 = 41;
  public static final int AP_UNAT = 42;
  public static final int AP_LC = 43;
  public static final int AP_EC = 43;
  public static final int AP_CCV = 45;
  public static final int AP_DCR = 46;
  public static final int RS_PFS = 47;
  public static final int AP_PFS = 47;
  public static final int RS_BSP = 48;
  public static final int AR_BSP = 48;
  public static final int RS_BSPSTORE = 49;
  public static final int AP_BSPSTORE = 49;
  public static final int RS_RSC = 50;
  public static final int AP_RSC = 50;
  public static final int RS_RNAT = 51;
  public static final int AP_RNAT = 51;
  public static final int ST_IPSR = 52;
  public static final int ST_IIP = 53;
  public static final int ST_IFS = 54;
  public static final int DB_I0 = 55;
  public static final int DB_I1 = 56;
  public static final int DB_I2 = 57;
  public static final int DB_I3 = 58;
  public static final int DB_I4 = 59;
  public static final int DB_I5 = 60;
  public static final int DB_I6 = 61;
  public static final int DB_I7 = 62;
  public static final int DB_D0 = 63;
  public static final int DB_D1 = 64;
  public static final int DB_D2 = 65;
  public static final int DB_D3 = 66;
  public static final int DB_D4 = 67;
  public static final int DB_D5 = 68;
  public static final int DB_D6 = 69;
  public static final int DB_D7 = 70;
  public static final int NPRGREG = 71;
  private static final String[] regNames = { "GR0", "GR1", "GR2", "GR3", "GR4", "GR5", "GR6", "GR7", "GR8", "GR9", "GR10", "GR11", "GR12", "GR13", "GR14", "GR15", "GR16", "GR17", "GR18", "GR19", "GR20", "GR21", "GR22", "GR23", "GR24", "GR25", "GR26", "GR27", "GR28", "GR29", "GR30", "GR31", "INT_NATS", "PREDS", "BR0", "BR1", "BR2", "BR3", "BR4", "BR5", "BR6", "BR7", "AP_UNAT", "AP_LC", "AP_EC", "AP_CCV", "AP_DCR", "RS_FPS", "RS_BSP", "RS_BSPSTORE", "RS_RSC", "RS_RNAT", "ST_IPSR", "ST_IIP", "ST_IFS", "DB_I0", "DB_I1", "DB_I2", "DB_I3", "DB_I4", "DB_I5", "DB_I6", "DB_I7", "DB_D0", "DB_D1", "DB_D2", "DB_D3", "DB_D4", "DB_D5", "DB_D6", "DB_D7" };
  private long[] data;
  
  public IA64ThreadContext()
  {
    data = new long[71];
  }
  
  public int getNumRegisters()
  {
    return 71;
  }
  
  public String getRegisterName(int index)
  {
    return regNames[index];
  }
  
  public void setRegister(int index, long value)
  {
    data[index] = value;
  }
  
  public long getRegister(int index)
  {
    return data[index];
  }
  
  public abstract void setRegisterAsAddress(int paramInt, Address paramAddress);
  
  public abstract Address getRegisterAsAddress(int paramInt);
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.debugger.ia64.IA64ThreadContext
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.debugger;

import java.io.BufferedInputStream;
import java.io.IOException;
import java.io.UnsupportedEncodingException;

public class InputLexer
{
  private BufferedInputStream in;
  private boolean pushedBack;
  private byte backBuf;
  
  public InputLexer(BufferedInputStream in)
    throws IOException
  {
    this.in = in;
    pushedBack = false;
  }
  
  public void close()
    throws IOException
  {
    in.close();
  }
  
  public boolean parseBoolean()
    throws IOException
  {
    int val = parseInt();
    return val != 0;
  }
  
  public int parseInt()
    throws IOException
  {
    long l = parseLong();
    long mask = -4294967296L;
    if ((l & mask) != 0L) {
      throw new IOException("Overflow error reading int from debug server (read " + l + ")");
    }
    return (int)l;
  }
  
  public long parseLong()
    throws IOException
  {
    skipWhitespace();
    byte b = readByte();
    if (!Character.isDigit((char)b)) {
      error();
    }
    long l = 0L;
    while (Character.isDigit((char)b))
    {
      l *= 10L;
      l += b - 48;
      b = readByte();
    }
    pushBack(b);
    return l;
  }
  
  public long parseAddress()
    throws IOException
  {
    skipWhitespace();
    if ((b = readByte()) != 48) {
      error();
    }
    byte b = readByte();
    if (b != 120) {
      error();
    }
    long val = 0L;
    while (isHexDigit((char)(b = readByte())))
    {
      val *= 16L;
      val += Character.digit((char)b, 16);
    }
    pushBack(b);
    return val;
  }
  
  public void skipByte()
    throws IOException
  {
    readByte();
  }
  
  public byte readByte()
    throws IOException
  {
    if (pushedBack)
    {
      pushedBack = false;
      return backBuf;
    }
    return readByteInternal();
  }
  
  public void readBytes(byte[] buf, int off, int len)
    throws IOException
  {
    int startIdx = off;
    int numRead = 0;
    if (pushedBack)
    {
      buf[startIdx] = backBuf;
      pushedBack = false;
      startIdx++;
      numRead++;
    }
    while (numRead < len) {
      numRead += in.read(buf, startIdx + numRead, len - numRead);
    }
  }
  
  public char readChar()
    throws IOException
  {
    int hi = readByte() & 0xFF;
    int lo = readByte() & 0xFF;
    return (char)(hi << 8 | lo);
  }
  
  public long readUnsignedInt()
    throws IOException
  {
    long b1 = readByte() & 0xFF;
    long b2 = readByte() & 0xFF;
    long b3 = readByte() & 0xFF;
    long b4 = readByte() & 0xFF;
    
    return b1 << 24 | b2 << 16 | b3 << 8 | b4;
  }
  
  public String readByteString(int len)
    throws IOException
  {
    byte[] b = new byte[len];
    for (int i = 0; i < len; i++) {
      b[i] = readByte();
    }
    try
    {
      return new String(b, "US-ASCII");
    }
    catch (UnsupportedEncodingException e)
    {
      throw new IOException(e.toString());
    }
  }
  
  public String readCharString(int len)
    throws IOException
  {
    char[] c = new char[len];
    for (int i = 0; i < len; i++) {
      c[i] = readChar();
    }
    return new String(c);
  }
  
  private void skipWhitespace()
    throws IOException
  {
    byte b;
    while (Character.isWhitespace((char)(b = readByte()))) {}
    pushBack(b);
  }
  
  private boolean isHexDigit(char c)
  {
    return (('0' <= c) && (c <= '9')) || (('a' <= c) && (c <= 'f')) || (('A' <= c) && (c <= 'F'));
  }
  
  private void pushBack(byte b)
  {
    if (pushedBack) {
      throw new InternalError("Only one character pushback supported");
    }
    backBuf = b;
    pushedBack = true;
  }
  
  private byte readByteInternal()
    throws IOException
  {
    int i = in.read();
    if (i == -1) {
      throw new IOException("End-of-file reached while reading from server");
    }
    return (byte)i;
  }
  
  private void error()
    throws IOException
  {
    throw new IOException("Error parsing output of debug server");
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.debugger.InputLexer
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.debugger;

public abstract interface JVMDebugger
  extends Debugger
{
  public abstract void configureJavaPrimitiveTypeSizes(long paramLong1, long paramLong2, long paramLong3, long paramLong4, long paramLong5, long paramLong6, long paramLong7, long paramLong8);
  
  public abstract void putHeapConst(long paramLong1, long paramLong2, int paramInt);
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.debugger.JVMDebugger
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.debugger.linux.amd64;

import sun.jvm.hotspot.debugger.Address;
import sun.jvm.hotspot.debugger.ThreadProxy;
import sun.jvm.hotspot.debugger.amd64.AMD64ThreadContext;
import sun.jvm.hotspot.debugger.cdbg.CFrame;
import sun.jvm.hotspot.debugger.cdbg.ClosestSymbol;
import sun.jvm.hotspot.debugger.cdbg.basic.BasicCFrame;
import sun.jvm.hotspot.debugger.linux.LinuxDebugger;

public final class LinuxAMD64CFrame
  extends BasicCFrame
{
  private static final int ADDRESS_SIZE = 8;
  private Address rip;
  private Address rbp;
  private LinuxDebugger dbg;
  
  public LinuxAMD64CFrame(LinuxDebugger dbg, Address rbp, Address rip)
  {
    super(dbg.getCDebugger());
    this.rbp = rbp;
    this.rip = rip;
    this.dbg = dbg;
  }
  
  public ClosestSymbol closestSymbolToPC()
  {
    return dbg.lookup(dbg.getAddressValue(pc()));
  }
  
  public Address pc()
  {
    return rip;
  }
  
  public Address localVariableBase()
  {
    return rbp;
  }
  
  public CFrame sender(ThreadProxy thread)
  {
    AMD64ThreadContext context = (AMD64ThreadContext)thread.getContext();
    Address rsp = context.getRegisterAsAddress(20);
    if ((rbp == null) || (rbp.lessThan(rsp))) {
      return null;
    }
    if (dbg.getAddressValue(rbp) % 8L != 0L) {
      return null;
    }
    Address nextRBP = rbp.getAddressAt(0L);
    if (nextRBP == null) {
      return null;
    }
    Address nextPC = rbp.getAddressAt(8L);
    if (nextPC == null) {
      return null;
    }
    return new LinuxAMD64CFrame(dbg, nextRBP, nextPC);
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.debugger.linux.amd64.LinuxAMD64CFrame
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.debugger.linux.amd64;

import sun.jvm.hotspot.debugger.Address;
import sun.jvm.hotspot.debugger.amd64.AMD64ThreadContext;
import sun.jvm.hotspot.debugger.linux.LinuxDebugger;

public class LinuxAMD64ThreadContext
  extends AMD64ThreadContext
{
  private LinuxDebugger debugger;
  
  public LinuxAMD64ThreadContext(LinuxDebugger debugger)
  {
    this.debugger = debugger;
  }
  
  public void setRegisterAsAddress(int index, Address value)
  {
    setRegister(index, debugger.getAddressValue(value));
  }
  
  public Address getRegisterAsAddress(int index)
  {
    return debugger.newAddress(getRegister(index));
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.debugger.linux.amd64.LinuxAMD64ThreadContext
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.debugger.linux.ia64;

import sun.jvm.hotspot.debugger.Address;
import sun.jvm.hotspot.debugger.ia64.IA64ThreadContext;
import sun.jvm.hotspot.debugger.linux.LinuxDebugger;

public class LinuxIA64ThreadContext
  extends IA64ThreadContext
{
  private LinuxDebugger debugger;
  
  public LinuxIA64ThreadContext(LinuxDebugger debugger)
  {
    this.debugger = debugger;
  }
  
  public void setRegisterAsAddress(int index, Address value)
  {
    setRegister(index, debugger.getAddressValue(value));
  }
  
  public Address getRegisterAsAddress(int index)
  {
    return debugger.newAddress(getRegister(index));
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.debugger.linux.ia64.LinuxIA64ThreadContext
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.debugger.linux;

import java.io.PrintStream;
import sun.jvm.hotspot.debugger.Address;
import sun.jvm.hotspot.debugger.DebuggerException;
import sun.jvm.hotspot.debugger.NotInHeapException;
import sun.jvm.hotspot.debugger.OopHandle;
import sun.jvm.hotspot.debugger.UnalignedAddressException;
import sun.jvm.hotspot.debugger.UnmappedAddressException;

class LinuxAddress
  implements Address
{
  protected LinuxDebugger debugger;
  protected long addr;
  
  LinuxAddress(LinuxDebugger debugger, long addr)
  {
    this.debugger = debugger;
    this.addr = addr;
  }
  
  public boolean equals(Object arg)
  {
    if (arg == null) {
      return false;
    }
    if (!(arg instanceof LinuxAddress)) {
      return false;
    }
    return addr == addr;
  }
  
  public int hashCode()
  {
    return (int)addr;
  }
  
  public String toString()
  {
    return debugger.addressValueToString(addr);
  }
  
  public long getCIntegerAt(long offset, long numBytes, boolean isUnsigned)
    throws UnalignedAddressException, UnmappedAddressException
  {
    return debugger.readCInteger(addr + offset, numBytes, isUnsigned);
  }
  
  public Address getAddressAt(long offset)
    throws UnalignedAddressException, UnmappedAddressException
  {
    return debugger.readAddress(addr + offset);
  }
  
  public Address getCompOopAddressAt(long offset)
    throws UnalignedAddressException, UnmappedAddressException
  {
    return debugger.readCompOopAddress(addr + offset);
  }
  
  public boolean getJBooleanAt(long offset)
    throws UnalignedAddressException, UnmappedAddressException
  {
    return debugger.readJBoolean(addr + offset);
  }
  
  public byte getJByteAt(long offset)
    throws UnalignedAddressException, UnmappedAddressException
  {
    return debugger.readJByte(addr + offset);
  }
  
  public char getJCharAt(long offset)
    throws UnalignedAddressException, UnmappedAddressException
  {
    return debugger.readJChar(addr + offset);
  }
  
  public double getJDoubleAt(long offset)
    throws UnalignedAddressException, UnmappedAddressException
  {
    return debugger.readJDouble(addr + offset);
  }
  
  public float getJFloatAt(long offset)
    throws UnalignedAddressException, UnmappedAddressException
  {
    return debugger.readJFloat(addr + offset);
  }
  
  public int getJIntAt(long offset)
    throws UnalignedAddressException, UnmappedAddressException
  {
    return debugger.readJInt(addr + offset);
  }
  
  public long getJLongAt(long offset)
    throws UnalignedAddressException, UnmappedAddressException
  {
    return debugger.readJLong(addr + offset);
  }
  
  public short getJShortAt(long offset)
    throws UnalignedAddressException, UnmappedAddressException
  {
    return debugger.readJShort(addr + offset);
  }
  
  public OopHandle getOopHandleAt(long offset)
    throws UnalignedAddressException, UnmappedAddressException, NotInHeapException
  {
    return debugger.readOopHandle(addr + offset);
  }
  
  public OopHandle getCompOopHandleAt(long offset)
    throws UnalignedAddressException, UnmappedAddressException, NotInHeapException
  {
    return debugger.readCompOopHandle(addr + offset);
  }
  
  public void setCIntegerAt(long offset, long numBytes, long value)
  {
    throw new DebuggerException("Unimplemented");
  }
  
  public void setAddressAt(long offset, Address value)
  {
    throw new DebuggerException("Unimplemented");
  }
  
  public void setJBooleanAt(long offset, boolean value)
    throws UnmappedAddressException, UnalignedAddressException
  {
    throw new DebuggerException("Unimplemented");
  }
  
  public void setJByteAt(long offset, byte value)
    throws UnmappedAddressException, UnalignedAddressException
  {
    throw new DebuggerException("Unimplemented");
  }
  
  public void setJCharAt(long offset, char value)
    throws UnmappedAddressException, UnalignedAddressException
  {
    throw new DebuggerException("Unimplemented");
  }
  
  public void setJDoubleAt(long offset, double value)
    throws UnmappedAddressException, UnalignedAddressException
  {
    throw new DebuggerException("Unimplemented");
  }
  
  public void setJFloatAt(long offset, float value)
    throws UnmappedAddressException, UnalignedAddressException
  {
    throw new DebuggerException("Unimplemented");
  }
  
  public void setJIntAt(long offset, int value)
    throws UnmappedAddressException, UnalignedAddressException
  {
    throw new DebuggerException("Unimplemented");
  }
  
  public void setJLongAt(long offset, long value)
    throws UnmappedAddressException, UnalignedAddressException
  {
    throw new DebuggerException("Unimplemented");
  }
  
  public void setJShortAt(long offset, short value)
    throws UnmappedAddressException, UnalignedAddressException
  {
    throw new DebuggerException("Unimplemented");
  }
  
  public void setOopHandleAt(long offset, OopHandle value)
    throws UnmappedAddressException, UnalignedAddressException
  {
    throw new DebuggerException("Unimplemented");
  }
  
  public Address addOffsetTo(long offset)
    throws UnsupportedOperationException
  {
    long value = addr + offset;
    if (value == 0L) {
      return null;
    }
    return new LinuxAddress(debugger, value);
  }
  
  public OopHandle addOffsetToAsOopHandle(long offset)
    throws UnsupportedOperationException
  {
    long value = addr + offset;
    if (value == 0L) {
      return null;
    }
    return new LinuxOopHandle(debugger, value);
  }
  
  public long minus(Address arg)
  {
    if (arg == null) {
      return addr;
    }
    return addr - addr;
  }
  
  public boolean lessThan(Address a)
  {
    if (a == null) {
      return false;
    }
    LinuxAddress arg = (LinuxAddress)a;
    if ((addr >= 0L) && (addr < 0L)) {
      return true;
    }
    if ((addr < 0L) && (addr >= 0L)) {
      return false;
    }
    return addr < addr;
  }
  
  public boolean lessThanOrEqual(Address a)
  {
    if (a == null) {
      return false;
    }
    LinuxAddress arg = (LinuxAddress)a;
    if ((addr >= 0L) && (addr < 0L)) {
      return true;
    }
    if ((addr < 0L) && (addr >= 0L)) {
      return false;
    }
    return addr <= addr;
  }
  
  public boolean greaterThan(Address a)
  {
    if (a == null) {
      return true;
    }
    LinuxAddress arg = (LinuxAddress)a;
    if ((addr >= 0L) && (addr < 0L)) {
      return false;
    }
    if ((addr < 0L) && (addr >= 0L)) {
      return true;
    }
    return addr > addr;
  }
  
  public boolean greaterThanOrEqual(Address a)
  {
    if (a == null) {
      return true;
    }
    LinuxAddress arg = (LinuxAddress)a;
    if ((addr >= 0L) && (addr < 0L)) {
      return false;
    }
    if ((addr < 0L) && (addr >= 0L)) {
      return true;
    }
    return addr >= addr;
  }
  
  public Address andWithMask(long mask)
    throws UnsupportedOperationException
  {
    long value = addr & mask;
    if (value == 0L) {
      return null;
    }
    return new LinuxAddress(debugger, value);
  }
  
  public Address orWithMask(long mask)
    throws UnsupportedOperationException
  {
    long value = addr | mask;
    if (value == 0L) {
      return null;
    }
    return new LinuxAddress(debugger, value);
  }
  
  public Address xorWithMask(long mask)
    throws UnsupportedOperationException
  {
    long value = addr ^ mask;
    if (value == 0L) {
      return null;
    }
    return new LinuxAddress(debugger, value);
  }
  
  long getValue()
  {
    return addr;
  }
  
  private static void check(boolean arg, String failMessage)
  {
    if (!arg)
    {
      System.err.println(failMessage + ": FAILED");
      System.exit(1);
    }
  }
  
  public static void main(String[] args)
  {
    LinuxAddress p1 = new LinuxAddress(null, 9223372036854775792L);
    LinuxAddress p2 = (LinuxAddress)p1.addOffsetTo(10L);
    LinuxAddress n1 = (LinuxAddress)p2.addOffsetTo(10L);
    LinuxAddress n2 = (LinuxAddress)n1.addOffsetTo(10L);
    
    check(p1.lessThan(p2), "lessThan 1");
    check(p1.lessThan(n1), "lessThan 2");
    check(p1.lessThan(n2), "lessThan 3");
    check(p2.lessThan(n1), "lessThan 4");
    check(p2.lessThan(n2), "lessThan 5");
    check(n1.lessThan(n2), "lessThan 6");
    
    check(!p1.lessThan(p1), "lessThan 7");
    check(!p2.lessThan(p2), "lessThan 8");
    check(!n1.lessThan(n1), "lessThan 9");
    check(!n2.lessThan(n2), "lessThan 10");
    
    check(!p2.lessThan(p1), "lessThan 11");
    check(!n1.lessThan(p1), "lessThan 12");
    check(!n2.lessThan(p1), "lessThan 13");
    check(!n1.lessThan(p2), "lessThan 14");
    check(!n2.lessThan(p2), "lessThan 15");
    check(!n2.lessThan(n1), "lessThan 16");
    
    check(p1.lessThanOrEqual(p1), "lessThanOrEqual 1");
    check(p2.lessThanOrEqual(p2), "lessThanOrEqual 2");
    check(n1.lessThanOrEqual(n1), "lessThanOrEqual 3");
    check(n2.lessThanOrEqual(n2), "lessThanOrEqual 4");
    
    
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114

Further reading...

For more information on Java 1.5 Tiger, you may find Java 1.5 Tiger, A developer's Notebook by D. Flanagan and B. McLaughlin from O'Reilly of interest.

New!JAR listings


Copyright 2006-2019. Infinite Loop Ltd