sa-jdi

id = pid;
  }
  
  public String getName()
  {
    return name;
  }
  
  public int getPid()
  {
    return pid;
  }
}

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

import java.io.IOException;
import java.io.RandomAccessFile;

public class RandomAccessFileDataSource
  implements DataSource
{
  private RandomAccessFile file;
  
  public RandomAccessFileDataSource(RandomAccessFile file)
  {
    this.file = file;
  }
  
  public byte readByte()
    throws IOException
  {
    return file.readByte();
  }
  
  public short readShort()
    throws IOException
  {
    return file.readShort();
  }
  
  public int readInt()
    throws IOException
  {
    return file.readInt();
  }
  
  public long readLong()
    throws IOException
  {
    return file.readLong();
  }
  
  public int read(byte[] b)
    throws IOException
  {
    return file.read(b);
  }
  
  public void seek(long pos)
    throws IOException
  {
    file.seek(pos);
  }
  
  public long getFilePointer()
    throws IOException
  {
    return file.getFilePointer();
  }
  
  public void close()
    throws IOException
  {
    file.close();
  }
}

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

import java.io.Serializable;

public class ReadResult
  implements Serializable
{
  private byte[] data;
  private long failureAddress;
  
  public ReadResult(byte[] data)
  {
    this.data = data;
  }
  
  public ReadResult(long failureAddress)
  {
    this.failureAddress = failureAddress;
  }
  
  public byte[] getData()
  {
    return data;
  }
  
  public long getFailureAddress()
  {
    return failureAddress;
  }
}

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

import sun.jvm.hotspot.debugger.Address;
import sun.jvm.hotspot.debugger.ThreadContext;
import sun.jvm.hotspot.debugger.remote.RemoteDebuggerClient;
import sun.jvm.hotspot.debugger.remote.RemoteThread;
import sun.jvm.hotspot.utilities.Assert;

public class RemoteAMD64Thread
  extends RemoteThread
{
  public RemoteAMD64Thread(RemoteDebuggerClient debugger, Address addr)
  {
    super(debugger, addr);
  }
  
  public RemoteAMD64Thread(RemoteDebuggerClient debugger, long id)
  {
    super(debugger, id);
  }
  
  public ThreadContext getContext()
    throws IllegalThreadStateException
  {
    RemoteAMD64ThreadContext context = new RemoteAMD64ThreadContext(debugger);
    long[] regs = addr != null ? debugger.getThreadIntegerRegisterSet(addr) : debugger.getThreadIntegerRegisterSet(id);
    if (Assert.ASSERTS_ENABLED) {
      Assert.that(regs.length == 28, "size of register set must match");
    }
    for (int i = 0; i < regs.length; i++) {
      context.setRegister(i, regs[i]);
    }
    return context;
  }
}

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

import sun.jvm.hotspot.debugger.Address;
import sun.jvm.hotspot.debugger.amd64.AMD64ThreadContext;
import sun.jvm.hotspot.debugger.remote.RemoteDebuggerClient;

public class RemoteAMD64ThreadContext
  extends AMD64ThreadContext
{
  private RemoteDebuggerClient debugger;
  
  public RemoteAMD64ThreadContext(RemoteDebuggerClient 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.remote.amd64.RemoteAMD64ThreadContext
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.debugger.remote.amd64;

import sun.jvm.hotspot.debugger.Address;
import sun.jvm.hotspot.debugger.ThreadProxy;
import sun.jvm.hotspot.debugger.remote.RemoteDebuggerClient;
import sun.jvm.hotspot.debugger.remote.RemoteThreadFactory;

public class RemoteAMD64ThreadFactory
  implements RemoteThreadFactory
{
  private RemoteDebuggerClient debugger;
  
  public RemoteAMD64ThreadFactory(RemoteDebuggerClient debugger)
  {
    this.debugger = debugger;
  }
  
  public ThreadProxy createThreadWrapper(Address threadIdentifierAddr)
  {
    return new RemoteAMD64Thread(debugger, threadIdentifierAddr);
  }
  
  public ThreadProxy createThreadWrapper(long id)
  {
    return new RemoteAMD64Thread(debugger, id);
  }
}

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

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 RemoteAddress
  implements Address
{
  protected RemoteDebuggerClient debugger;
  protected long addr;
  
  RemoteAddress(RemoteDebuggerClient debugger, long addr)
  {
    this.debugger = debugger;
    this.addr = addr;
  }
  
  public boolean equals(Object arg)
  {
    if (arg == null) {
      return false;
    }
    if (!(arg instanceof RemoteAddress)) {
      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 RemoteAddress(debugger, value);
  }
  
  public OopHandle addOffsetToAsOopHandle(long offset)
    throws UnsupportedOperationException
  {
    long value = addr + offset;
    if (value == 0L) {
      return null;
    }
    return new RemoteOopHandle(debugger, value);
  }
  
  public long minus(Address arg)
  {
    if (arg == null) {
      return addr;
    }
    return addr - addr;
  }
  
  public boolean lessThan(Address arg)
  {
    if (arg == null) {
      return false;
    }
    RemoteAddress remoteArg = (RemoteAddress)arg;
    if ((addr >= 0L) && (addr < 0L)) {
      return true;
    }
    if ((addr < 0L) && (addr >= 0L)) {
      return false;
    }
    return addr < addr;
  }
  
  public boolean lessThanOrEqual(Address arg)
  {
    if (arg == null) {
      return false;
    }
    RemoteAddress remoteArg = (RemoteAddress)arg;
    if ((addr >= 0L) && (addr < 0L)) {
      return true;
    }
    if ((addr < 0L) && (addr >= 0L)) {
      return false;
    }
    return addr <= addr;
  }
  
  public boolean greaterThan(Address arg)
  {
    if (arg == null) {
      return true;
    }
    RemoteAddress remoteArg = (RemoteAddress)arg;
    if ((addr >= 0L) && (addr < 0L)) {
      return false;
    }
    if ((addr < 0L) && (addr >= 0L)) {
      return true;
    }
    return addr > addr;
  }
  
  public boolean greaterThanOrEqual(Address arg)
  {
    if (arg == null) {
      return true;
    }
    RemoteAddress remoteArg = (RemoteAddress)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 RemoteAddress(debugger, value);
  }
  
  public Address orWithMask(long mask)
    throws UnsupportedOperationException
  {
    long value = addr | mask;
    if (value == 0L) {
      return null;
    }
    return new RemoteAddress(debugger, value);
  }
  
  public Address xorWithMask(long mask)
    throws UnsupportedOperationException
  {
    long value = addr ^ mask;
    if (value == 0L) {
      return null;
    }
    return new RemoteAddress(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)
  {
    RemoteAddress p1 = new RemoteAddress(null, 9223372036854775792L);
    RemoteAddress p2 = (RemoteAddress)p1.addOffsetTo(10L);
    RemoteAddress n1 = (RemoteAddress)p2.addOffsetTo(10L);
    RemoteAddress n2 = (RemoteAddress)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("RemoteAddress: all tests passed successfully.");
  }
}

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

import java.rmi.Remote;
import java.rmi.RemoteException;
import sun.jvm.hotspot.debugger.MachineDescription;
import sun.jvm.hotspot.debugger.ReadResult;

public abstract interface RemoteDebugger
  extends Remote
{
  public abstract String getOS()
    throws RemoteException;
  
  public abstract String getCPU()
    throws RemoteException;
  
  public abstract MachineDescription getMachineDescription()
    throws RemoteException;
  
  public abstract long lookupInProcess(String paramString1, String paramString2)
    throws RemoteException;
  
  public abstract ReadResult readBytesFromProcess(long paramLong1, long paramLong2)
    throws RemoteException;
  
  public abstract boolean hasConsole()
    throws RemoteException;
  
  public abstract String getConsolePrompt()
    throws RemoteException;
  
  public abstract String consoleExecuteCommand(String paramString)
    throws RemoteException;
  
  public abstract long getJBooleanSize()
    throws RemoteException;
  
  public abstract long getJByteSize()
    throws RemoteException;
  
  public abstract long getJCharSize()
    throws RemoteException;
  
  public abstract long getJDoubleSize()
    throws RemoteException;
  
  public abstract long getJFloatSize()
    throws RemoteException;
  
  public abstract long getJIntSize()
    throws RemoteException;
  
  public abstract long getJLongSize()
    throws RemoteException;
  
  public abstract long getJShortSize()
    throws RemoteException;
  
  public abstract long getHeapOopSize()
    throws RemoteException;
  
  public abstract long getNarrowOopBase()
    throws RemoteException;
  
  public abstract int getNarrowOopShift()
    throws RemoteException;
  
  public abstract boolean areThreadsEqual(long paramLong1, boolean paramBoolean1, long paramLong2, boolean paramBoolean2)
    throws RemoteException;
  
  public abstract int getThreadHashCode(long paramLong, boolean paramBoolean)
    throws RemoteException;
  
  public abstract long[] getThreadIntegerRegisterSet(long paramLong, boolean paramBoolean)
    throws RemoteException;
}

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

import java.rmi.RemoteException;
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.DebuggerUtilities;
import sun.jvm.hotspot.debugger.JVMDebugger;
import sun.jvm.hotspot.debugger.MachineDescription;
import sun.jvm.hotspot.debugger.NotInHeapException;
import sun.jvm.hotspot.debugger.OopHandle;
import sun.jvm.hotspot.debugger.ReadResult;
import sun.jvm.hotspot.debugger.ThreadProxy;
import sun.jvm.hotspot.debugger.UnalignedAddressException;
import sun.jvm.hotspot.debugger.UnmappedAddressException;
import sun.jvm.hotspot.debugger.cdbg.CDebugger;
import sun.jvm.hotspot.debugger.remote.amd64.RemoteAMD64ThreadFactory;
import sun.jvm.hotspot.debugger.remote.sparc.RemoteSPARCThreadFactory;
import sun.jvm.hotspot.debugger.remote.x86.RemoteX86ThreadFactory;

public class RemoteDebuggerClient
  extends DebuggerBase
  implements JVMDebugger
{
  private RemoteDebugger remoteDebugger;
  private RemoteThreadFactory threadFactory;
  private boolean unalignedAccessesOkay = false;
  private static final int cacheSize = 16777216;
  
  public RemoteDebuggerClient(RemoteDebugger remoteDebugger)
    throws DebuggerException
  {
    try
    {
      this.remoteDebugger = remoteDebugger;
      machDesc = remoteDebugger.getMachineDescription();
      utils = new DebuggerUtilities(machDesc.getAddressSize(), machDesc.isBigEndian());
      
      String cpu = remoteDebugger.getCPU();
      int cacheNumPages;
      if (cpu.equals("sparc"))
      {
        threadFactory = new RemoteSPARCThreadFactory(this);
        int cachePageSize = 8192;
        cacheNumPages = parseCacheNumPagesProperty(16777216 / cachePageSize);
      }
      else if (cpu.equals("x86"))
      {
        threadFactory = new RemoteX86ThreadFactory(this);
        int cachePageSize = 4096;
        int cacheNumPages = parseCacheNumPagesProperty(16777216 / cachePageSize);
        unalignedAccessesOkay = true;
      }
      else if (cpu.equals("amd64"))
      {
        threadFactory = new RemoteAMD64ThreadFactory(this);
        int cachePageSize = 4096;
        int cacheNumPages = parseCacheNumPagesProperty(16777216 / cachePageSize);
        unalignedAccessesOkay = true;
      }
      else
      {
        throw new DebuggerException("Thread access for CPU architecture " + cpu + " not yet supported");
      }
      int cachePageSize;
      int cacheNumPages;
      initCache(cachePageSize, cacheNumPages);
      
      jbooleanSize = remoteDebugger.getJBooleanSize();
      jbyteSize = remoteDebugger.getJByteSize();
      jcharSize = remoteDebugger.getJCharSize();
      jdoubleSize = remoteDebugger.getJDoubleSize();
      jfloatSize = remoteDebugger.getJFloatSize();
      jintSize = remoteDebugger.getJIntSize();
      jlongSize = remoteDebugger.getJLongSize();
      jshortSize = remoteDebugger.getJShortSize();
      javaPrimitiveTypesConfigured = true;
      narrowOopBase = remoteDebugger.getNarrowOopBase();
      narrowOopShift = remoteDebugger.getNarrowOopShift();
      heapOopSize = remoteDebugger.getHeapOopSize();
    }
    catch (RemoteException e)
    {
      throw new DebuggerException(e);
    }
  }
  
  public long[] getThreadIntegerRegisterSet(Address addr)
  {
    try
    {
      return remoteDebugger.getThreadIntegerRegisterSet(getAddressValue(addr), true);
    }
    catch (RemoteException e)
    {
      throw new DebuggerException(e);
    }
  }
  
  public long[] getThreadIntegerRegisterSet(long id)
  {
    try
    {
      return remoteDebugger.getThreadIntegerRegisterSet(id, false);
    }
    catch (RemoteException e)
    {
      throw new DebuggerException(e);
    }
  }
  
  public boolean hasProcessList()
    throws DebuggerException
  {
    throw new DebuggerException("Should not be called on RemoteDebuggerClient");
  }
  
  public List getProcessList()
    throws DebuggerException
  {
    throw new DebuggerException("Should not be called on RemoteDebuggerClient");
  }
  
  public void attach(int processID)
    throws DebuggerException
  {
    throw new DebuggerException("Should not be called on RemoteDebuggerClient");
  }
  
  public void attach(String executableName, String coreFileName)
    throws DebuggerException
  {
    throw new DebuggerException("Should not be called on RemoteDebuggerClient");
  }
  
  public boolean detach()
  {
    throw new DebuggerException("Should not be called on RemoteDebuggerClient");
  }
  
  public Address parseAddress(String addressString)
    throws NumberFormatException
  {
    long addr = utils.scanAddress(addressString);
    if (addr == 0L) {
      return null;
    }
    return new RemoteAddress(this, addr);
  }
  
  public String getOS()
    throws DebuggerException
  {
    try
    {
      return remoteDebugger.getOS();
    }
    catch (RemoteException e)
    {
      throw new DebuggerException(e);
    }
  }
  
  public String getCPU()
  {
    try
    {
      return remoteDebugger.getCPU();
    }
    catch (RemoteException e)
    {
      throw new DebuggerException(e);
    }
  }
  
  public boolean hasConsole()
    throws DebuggerException
  {
    try
    {
      return remoteDebugger.hasConsole();
    }
    catch (RemoteException e)
    {
      throw new DebuggerException(e);
    }
  }
  
  public String consoleExecuteCommand(String cmd)
    throws DebuggerException
  {
    try
    {
      return remoteDebugger.consoleExecuteCommand(cmd);
    }
    catch (RemoteException e)
    {
      throw new DebuggerException(e);
    }
  }
  
  public String getConsolePrompt()
    throws DebuggerException
  {
    try
    {
      return remoteDebugger.getConsolePrompt();
    }
    catch (RemoteException e)
    {
      throw new DebuggerException(e);
    }
  }
  
  public CDebugger getCDebugger()
    throws DebuggerException
  {
    return null;
  }
  
  public Address lookup(String objectName, String symbol)
  {
    try
    {
      long addr = remoteDebugger.lookupInProcess(objectName, symbol);
      if (addr == 0L) {
        return null;
      }
      return new RemoteAddress(this, addr);
    }
    catch (RemoteException e)
    {
      throw new DebuggerException(e);
    }
  }
  
  public OopHandle lookupOop(String objectName, String symbol)
  {
    try
    {
      long addr = remoteDebugger.lookupInProcess(objectName, symbol);
      if (addr == 0L) {
        return null;
      }
      return new RemoteOopHandle(this, addr);
    }
    catch (RemoteException e)
    {
      throw new DebuggerException(e);
    }
  }
  
  public long readCInteger(long address, long numBytes, boolean isUnsigned)
    throws UnmappedAddressException, UnalignedAddressException
  {
    if (!unalignedAccessesOkay) {
      utils.checkAlignment(address, numBytes);
    } else if (numBytes == 8L) {
      utils.checkAlignment(address, 4L);
    } else {
      utils.checkAlignment(address, numBytes);
    }
    byte[] data = readBytes(address, numBytes);
    return utils.dataToCInteger(data, isUnsigned);
  }
  
  public long readJLong(long address)
    throws UnmappedAddressException, UnalignedAddressException
  {
    if (unalignedAccessesOkay) {
      utils.checkAlignment(address, jintSize);
    } else {
      utils.checkAlignment(address, jlongSize);
    }
    byte[] data = readBytes(address, jlongSize);
    return utils.dataToJLong(data, jlongSize);
  }
  
  public void configureJavaPrimitiveTypeSizes(long jbooleanSize, long jbyteSize, long jcharSize, long jdoubleSize, long jfloatSize, long jintSize, long jlongSize, long jshortSize)
  {
    throw new DebuggerException("Should not be called on RemoteDebuggerClient");
  }
  
  public void setMachineDescription(MachineDescription machDesc)
  {
    throw new DebuggerException("Should not be called on RemoteDebuggerClient");
  }
  
  public int getRemoteProcessAddressSize()
  {
    throw new DebuggerException("Should not be called on RemoteDebuggerClient");
  }
  
  public String addressValueToString(long addr)
  {
    return utils.addressValueToString(addr);
  }
  
  public long getAddressValue(Address addr)
    throws DebuggerException
  {
    if (addr == null) {
      return 0L;
    }
    return ((RemoteAddress)addr).getValue();
  }
  
  public Address newAddress(long value)
  {
    if (value == 0L) {
      return null;
    }
    return new RemoteAddress(this, value);
  }
  
  RemoteAddress readAddress(long address)
    throws UnmappedAddressException, UnalignedAddressException
  {
    long value = readAddressValue(address);
    return value == 0L ? null : new RemoteAddress(this, value);
  }
  
  RemoteAddress readCompOopAddress(long address)
    throws UnmappedAddressException, UnalignedAddressException
  {
    long value = readCompOopAddressValue(address);
    return value == 0L ? null : new RemoteAddress(this, value);
  }
  
  RemoteOopHandle readOopHandle(long address)
    throws UnmappedAddressException, UnalignedAddressException, NotInHeapException
  {
    long value = readAddressValue(address);
    return value == 0L ? null : new RemoteOopHandle(this, value);
  }
  
  RemoteOopHandle readCompOopHandle(long address)
    throws UnmappedAddressException, UnalignedAddressException, NotInHeapException
  {
    long value = readCompOopAddressValue(address);
    return value == 0L ? null : new RemoteOopHandle(this, value);
  }
  
  boolean areThreadsEqual(Address addr1, Address addr2)
  {
    try
    {
      return remoteDebugger.areThreadsEqual(getAddressValue(addr1), true, getAddressValue(addr2), true);
    }
    catch (RemoteException e) {}
    return false;
  }
  
  boolean areThreadsEqual(long id1, long id2)
  {
    try
    {
      return remoteDebugger.areThreadsEqual(id1, false, id2, false);
    }
    catch (RemoteException e) {}
    return false;
  }
  
  boolean areThreadsEqual(Address addr1, long id2)
  {
    try
    {
      return remoteDebugger.areThreadsEqual(getAddressValue(addr1), true, id2, false);
    }
    catch (RemoteException e) {}
    return false;
  }
  
  boolean areThreadsEqual(long id1, Address addr2)
  {
    try
    {
      return remoteDebugger.areThreadsEqual(id1, false, getAddressValue(addr2), true);
    }
    catch (RemoteException e) {}
    return false;
  }
  
  int getThreadHashCode(Address a)
  {
    try
    {
      return remoteDebugger.getThreadHashCode(getAddressValue(a), true);
    }
    catch (RemoteException e) {}
    return a.hashCode();
  }
  
  int getThreadHashCode(long id)
  {
    try
    {
      return remoteDebugger.getThreadHashCode(id, false);
    }
    catch (RemoteException e) {}
    return (int)id;
  }
  
  public ThreadProxy getThreadForIdentifierAddress(Address addr)
  {
    return threadFactory.createThreadWrapper(addr);
  }
  
  public ThreadProxy getThreadForThreadId(long id)
  {
    return threadFactory.createThreadWrapper(id);
  }
  
  public MachineDescription getMachineDescription()
    throws DebuggerException
  {
    return machDesc;
  }
  
  public ReadResult readBytesFromProcess(long address, long numBytes)
  {
    try
    {
      return remoteDebugger.readBytesFromProcess(address, numBytes);
    }
    catch (RemoteException e)
    {
      throw new DebuggerException(e);
    }
  }
  
  public void writeBytesToProcess(long a, long b, byte[] c)
  {
    throw new DebuggerException("Unimplemented!");
  }
}

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

import java.rmi.RemoteException;
import java.rmi.server.UnicastRemoteObject;
import sun.jvm.hotspot.debugger.Address;
import sun.jvm.hotspot.debugger.Debugger;
import sun.jvm.hotspot.debugger.DebuggerException;
import sun.jvm.hotspot.debugger.MachineDescription;
import sun.jvm.hotspot.debugger.ReadResult;
import sun.jvm.hotspot.debugger.ThreadContext;
import sun.jvm.hotspot.debugger.ThreadProxy;

public class RemoteDebuggerServer
  extends UnicastRemoteObject
  implements RemoteDebugger
{
  private transient Debugger debugger;
  
  public RemoteDebuggerServer()
    throws RemoteException
  {}
  
  public RemoteDebuggerServer(Debugger debugger)
    throws RemoteException
  {
    this.debugger = debugger;
  }
  
  public String getOS()
    throws RemoteException
  {
    return debugger.getOS();
  }
  
  public String getCPU()
    throws RemoteException
  {
    return debugger.getCPU();
  }
  
  public MachineDescription getMachineDescription()
    throws RemoteException
  {
    return debugger.getMachineDescription();
  }
  
  public long lookupInProcess(String objectName, String symbol)
    throws RemoteException
  {
    Address addr = debugger.lookup(objectName, symbol);
    return addr == null ? 0L : debugger.getAddressValue(addr);
  }
  
  public ReadResult readBytesFromProcess(long address, long numBytes)
    throws RemoteException
  {
    return debugger.readBytesFromProcess(address, numBytes);
  }
  
  public boolean hasConsole()
    throws RemoteException
  {
    return debugger.hasConsole();
  }
  
  public String getConsolePrompt()
    throws RemoteException
  {
    return debugger.getConsolePrompt();
  }
  
  public String consoleExecuteCommand(String cmd)
    throws RemoteException
  {
    return debugger.consoleExecuteCommand(cmd);
  }
  
  public long getJBooleanSize()
    throws RemoteException
  {
    return debugger.getJBooleanSize();
  }
  
  public long getJByteSize()
    throws RemoteException
  {
    return debugger.getJByteSize();
  }
  
  public long getJCharSize()
    throws RemoteException
  {
    return debugger.getJCharSize();
  }
  
  public long getJDoubleSize()
    throws RemoteException
  {
    return debugger.getJDoubleSize();
  }
  
  public long getJFloatSize()
    throws RemoteException
  {
    return debugger.getJFloatSize();
  }
  
  public long getJIntSize()
    throws RemoteException
  {
    return debugger.getJIntSize();
  }
  
  public long getJLongSize()
    throws RemoteException
  {
    return debugger.getJLongSize();
  }
  
  public long getJShortSize()
    throws RemoteException
  {
    return debugger.getJShortSize();
  }
  
  public long getHeapOopSize()
    throws RemoteException
  {
    return debugger.getHeapOopSize();
  }
  
  public long getNarrowOopBase()
    throws RemoteException
  {
    return debugger.getNarrowOopBase();
  }
  
  public int getNarrowOopShift()
    throws RemoteException
  {
    return debugger.getNarrowOopShift();
  }
  
  public boolean areThreadsEqual(long addrOrId1, boolean isAddress1, long addrOrId2, boolean isAddress2)
    throws RemoteException
  {
    ThreadProxy t1 = getThreadProxy(addrOrId1, isAddress1);
    ThreadProxy t2 = getThreadProxy(addrOrId2, isAddress2);
    return t1.equals(t2);
  }
  
  public int getThreadHashCode(long addrOrId, boolean isAddress)
    throws RemoteException
  {
    ThreadProxy t = getThreadProxy(addrOrId, isAddress);
    return t.hashCode();
  }
  
  public long[] getThreadIntegerRegisterSet(long addrOrId, boolean isAddress)
    throws RemoteException
  {
    ThreadProxy t = getThreadProxy(addrOrId, isAddress);
    ThreadContext tc = t.getContext();
    long[] regs = new long[tc.getNumRegisters()];
    for (int r = 0; r < regs.length; r++) {
      regs[r] = tc.getRegister(r);
    }
    return regs;
  }
  
  private ThreadProxy getThreadProxy(long addrOrId, boolean isAddress)
    throws DebuggerException
  {
    if (isAddress)
    {
      Address addr = debugger.parseAddress("0x" + Long.toHexString(addrOrId));
      return debugger.getThreadForIdentifierAddress(addr);
    }
    return debugger.getThreadForThreadId(addrOrId);
  }
}

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

import java.lang.reflect.Method;
import java.rmi.Remote;
import java.rmi.RemoteException;
import java.rmi.UnexpectedException;
import java.rmi.server.RemoteObject;
import java.rmi.server.RemoteRef;
import java.rmi.server.RemoteStub;
import sun.jvm.hotspot.debugger.MachineDescription;
import sun.jvm.hotspot.debugger.ReadResult;

public final class RemoteDebuggerServer_Stub
  extends RemoteStub
  implements RemoteDebugger, Remote
{
  private static final long serialVersionUID = 2L;
  private static Method $method_areThreadsEqual_0;
  private static Method $method_consoleExecuteCommand_1;
  private static Method $method_getCPU_2;
  private static Method $method_getConsolePrompt_3;
  private static Method $method_getHeapOopSize_4;
  private static Method $method_getJBooleanSize_5;
  private static Method $method_getJByteSize_6;
  private static Method $method_getJCharSize_7;
  private static Method $method_getJDoubleSize_8;
  private static Method $method_getJFloatSize_9;
  private static Method $method_getJIntSize_10;
  private static Method $method_getJLongSize_11;
  private static Method $method_getJShortSize_12;
  private static Method $method_getMachineDescription_13;
  private static Method $method_getNarrowOopBase_14;
  private static Method $method_getNarrowOopShift_15;
  private static Method $method_getOS_16;
  private static Method $method_getThreadHashCode_17;
  private static Method $method_getThreadIntegerRegisterSet_18;
  private static Method $method_hasConsole_19;
  private static Method $method_lookupInProcess_20;
  private static Method $method_readBytesFromProcess_21;
  
  static
  {
    try
    {
      $method_areThreadsEqual_0 = RemoteDebugger.class.getMethod("areThreadsEqual", new Class[] { Long.TYPE, Boolean.TYPE, Long.TYPE, Boolean.TYPE });
      $method_consoleExecuteCommand_1 = RemoteDebugger.class.getMethod("consoleExecuteCommand", new Class[] { String.class });
      $method_getCPU_2 = RemoteDebugger.class.getMethod("getCPU", new Class[0]);
      $method_getConsolePrompt_3 = RemoteDebugger.class.getMethod("getConsolePrompt", new Class[0]);
      $method_getHeapOopSize_4 = RemoteDebugger.class.getMethod("getHeapOopSize", new Class[0]);
      $method_getJBooleanSize_5 = RemoteDebugger.class.getMethod("getJBooleanSize", new Class[0]);
      $method_getJByteSize_6 = RemoteDebugger.class.getMethod("getJByteSize", new Class[0]);
      $method_getJCharSize_7 = RemoteDebugger.class.getMethod("getJCharSize", new Class[0]);
      $method_getJDoubleSize_8 = RemoteDebugger.class.getMethod("getJDoubleSize", new Class[0]);
      $method_getJFloatSize_9 = RemoteDebugger.class.getMethod("getJFloatSize", new Class[0]);
      $method_getJIntSize_10 = RemoteDebugger.class.getMethod("getJIntSize", new Class[0]);
      $method_getJLongSize_11 = RemoteDebugger.class.getMethod("getJLongSize", new Class[0]);
      $method_getJShortSize_12 = RemoteDebugger.class.getMethod("getJShortSize", new Class[0]);
      $method_getMachineDescription_13 = RemoteDebugger.class.getMethod("getMachineDescription", new Class[0]);
      $method_getNarrowOopBase_14 = RemoteDebugger.class.getMethod("getNarrowOopBase", new Class[0]);
      $method_getNarrowOopShift_15 = RemoteDebugger.class.getMethod("getNarrowOopShift", new Class[0]);
      $method_getOS_16 = RemoteDebugger.class.getMethod("getOS", new Class[0]);
      $method_getThreadHashCode_17 = RemoteDebugger.class.getMethod("getThreadHashCode", new Class[] { Long.TYPE, Boolean.TYPE });
      $method_getThreadIntegerRegisterSet_18 = RemoteDebugger.class.getMethod("getThreadIntegerRegisterSet", new Class[] { Long.TYPE, Boolean.TYPE });
      $method_hasConsole_19 = RemoteDebugger.class.getMethod("hasConsole", new Class[0]);
      $method_lookupInProcess_20 = RemoteDebugger.class.getMethod("lookupInProcess", new Class[] { String.class, String.class });
      $method_readBytesFromProcess_21 = RemoteDebugger.class.getMethod("readBytesFromProcess", new Class[] { Long.TYPE, Long.TYPE });
    }
    catch (NoSuchMethodException localNoSuchMethodException)
    {
      throw new NoSuchMethodError("stub class initialization failed");
    }
  }
  
  public RemoteDebuggerServer_Stub(RemoteRef paramRemoteRef)
  {
    super(paramRemoteRef);
  }
  
  public boolean areThreadsEqual(long paramLong1, boolean paramBoolean1, long paramLong2, boolean paramBoolean2)
    throws RemoteException
  {
    try
    {
      Object localObject = ref.invoke(this, $method_areThreadsEqual_0, new Object[] { new Long(paramLong1), paramBoolean1 ? Boolean.TRUE : Boolean.FALSE, new Long(paramLong2), paramBoolean2 ? Boolean.TRUE : Boolean.FALSE }, -1245110986908462524L);
      return ((Boolean)localObject).booleanValue();
    }
    catch (RuntimeException localRuntimeException)
    {
      throw localRuntimeException;
    }
    catch (RemoteException localRemoteException)
    {
      throw localRemoteException;
    }
    catch (Exception localException)
    {
      throw new UnexpectedException("undeclared checked exception", localException);
    }
  }
  
  public String consoleExecuteCommand(String paramString)
    throws RemoteException
  {
    try
    {
      Object localObject = ref.invoke(this, $method_consoleExecuteCommand_1, new Object[] { paramString }
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