sa-jdi

 CompoundType
{
  public abstract int getNumBaseClasses();
  
  public abstract BaseClass getBaseClass(int paramInt);
  
  public abstract int getNumFields();
  
  public abstract Field getField(int paramInt);
  
  public abstract boolean isClass();
  
  public abstract boolean isStruct();
  
  public abstract boolean isUnion();
}

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

public abstract interface CVAttributes
{
  public static final int CONST = 1;
  public static final int VOLATILE = 2;
}

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

public class DebugEvent$Type
{
  public static final Type LOADOBJECT_LOAD = new Type();
  public static final Type LOADOBJECT_UNLOAD = new Type();
  public static final Type BREAKPOINT = new Type();
  public static final Type SINGLE_STEP = new Type();
  public static final Type ACCESS_VIOLATION = new Type();
  public static final Type UNKNOWN = new Type();
}

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

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

public abstract interface DebugEvent
{
  public abstract Type getType();
  
  public abstract ThreadProxy getThread();
  
  public abstract Address getPC();
  
  public abstract boolean getWasWrite();
  
  public abstract Address getAddress();
  
  public abstract String getUnknownEventDetail();
  
  public static class Type
  {
    public static final Type LOADOBJECT_LOAD = new Type();
    public static final Type LOADOBJECT_UNLOAD = new Type();
    public static final Type BREAKPOINT = new Type();
    public static final Type SINGLE_STEP = new Type();
    public static final Type ACCESS_VIOLATION = new Type();
    public static final Type UNKNOWN = new Type();
  }
}

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

import sun.jvm.hotspot.debugger.Address;

public class DefaultObjectVisitor
  implements ObjectVisitor
{
  public void enterType(Type type, Address objectAddress) {}
  
  public void exitType() {}
  
  public void doBit(FieldIdentifier f, long val) {}
  
  public void doInt(FieldIdentifier f, long val) {}
  
  public void doEnum(FieldIdentifier f, long val, String enumName) {}
  
  public void doFloat(FieldIdentifier f, float val) {}
  
  public void doDouble(FieldIdentifier f, double val) {}
  
  public void doPointer(FieldIdentifier f, Address val) {}
  
  public void doArray(FieldIdentifier f, Address val) {}
  
  public void doRef(FieldIdentifier f, Address val) {}
  
  public void doCompound(FieldIdentifier f, Address addressOfEmbeddedCompoundObject) {}
}

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

public abstract interface DoubleType
  extends Type
{}

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

public abstract interface EnumType
  extends IntType
{
  public abstract int getNumEnumerates();
  
  public abstract String getEnumName(int paramInt);
  
  public abstract long getEnumValue(int paramInt);
  
  public abstract String enumNameForValue(long paramLong);
}

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

import sun.jvm.hotspot.debugger.Address;

public abstract interface Field
{
  public abstract int getAccessControl();
  
  public abstract String getName();
  
  public abstract Type getType();
  
  public abstract boolean isStatic();
  
  public abstract long getOffset();
  
  public abstract Address getAddress();
}

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

public abstract interface FieldIdentifier
{
  public abstract Type getType();
  
  public abstract String toString();
}

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

public abstract interface FloatType
  extends Type
{}

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

public abstract interface FunctionSym
  extends BlockSym
{
  public abstract Type getType();
  
  public abstract boolean isModuleLocal();
  
  public abstract String toString();
}

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

public abstract interface FunctionType
  extends Type
{
  public abstract Type getReturnType();
  
  public abstract int getNumArguments();
  
  public abstract Type getArgumentType(int paramInt);
}

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

import sun.jvm.hotspot.debugger.Address;

public abstract interface GlobalSym
  extends Sym
{
  public abstract String getName();
  
  public abstract Type getType();
  
  public abstract Address getAddress();
  
  public abstract boolean isModuleLocal();
}

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

public abstract interface IndexableFieldIdentifier
  extends FieldIdentifier
{
  public abstract int getIndex();
}

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

public abstract interface IntType
  extends Type
{
  public abstract int getIntSize();
  
  public abstract boolean isUnsigned();
}

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

import sun.jvm.hotspot.debugger.Address;

public abstract interface LineNumberInfo
{
  public abstract String getSourceFileName();
  
  public abstract int getLineNumber();
  
  public abstract Address getStartPC();
  
  public abstract Address getEndPC();
}

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

public abstract interface LineNumberVisitor
{
  public abstract void doLineNumber(LineNumberInfo paramLineNumberInfo);
}

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

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

public abstract interface LoadObject
{
  public abstract Address getBase();
  
  public abstract String getName();
  
  public abstract long getSize();
  
  public abstract CDebugInfoDataBase getDebugInfoDataBase()
    throws DebuggerException;
  
  public abstract BlockSym debugInfoForPC(Address paramAddress)
    throws DebuggerException;
  
  public abstract ClosestSymbol closestSymbolToPC(Address paramAddress)
    throws DebuggerException;
  
  public abstract LineNumberInfo lineNumberForPC(Address paramAddress)
    throws DebuggerException;
}

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

import java.util.Comparator;
import sun.jvm.hotspot.debugger.Address;

public class LoadObjectComparator
  implements Comparator
{
  public int compare(Object o1, Object o2)
  {
    LoadObject lo1 = (LoadObject)o1;
    LoadObject lo2 = (LoadObject)o2;
    Address base1 = lo1.getBase();
    Address base2 = lo2.getBase();
    long diff = base1.minus(base2);
    return diff < 0L ? -1 : diff == 0L ? 0 : 1;
  }
  
  public boolean equals(Object o)
  {
    if ((o == null) || (!(o instanceof LoadObjectComparator))) {
      return false;
    }
    return true;
  }
}

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

public abstract interface LocalSym
  extends Sym
{
  public abstract String getName();
  
  public abstract Type getType();
  
  public abstract long getFrameOffset();
}

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

public abstract interface MemberFunctionType
  extends FunctionType
{
  public abstract Type getContainingClass();
  
  public abstract Type getThisType();
  
  public abstract long getThisAdjust();
}

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

public abstract interface NamedFieldIdentifier
  extends FieldIdentifier
{
  public abstract String getName();
}

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

import sun.jvm.hotspot.debugger.Address;

public abstract interface ObjectVisitor
{
  public abstract void enterType(Type paramType, Address paramAddress);
  
  public abstract void exitType();
  
  public abstract void doBit(FieldIdentifier paramFieldIdentifier, long paramLong);
  
  public abstract void doInt(FieldIdentifier paramFieldIdentifier, long paramLong);
  
  public abstract void doEnum(FieldIdentifier paramFieldIdentifier, long paramLong, String paramString);
  
  public abstract void doFloat(FieldIdentifier paramFieldIdentifier, float paramFloat);
  
  public abstract void doDouble(FieldIdentifier paramFieldIdentifier, double paramDouble);
  
  public abstract void doPointer(FieldIdentifier paramFieldIdentifier, Address paramAddress);
  
  public abstract void doArray(FieldIdentifier paramFieldIdentifier, Address paramAddress);
  
  public abstract void doRef(FieldIdentifier paramFieldIdentifier, Address paramAddress);
  
  public abstract void doCompound(FieldIdentifier paramFieldIdentifier, Address paramAddress);
}

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

public abstract interface PointerType
  extends Type
{
  public abstract Type getTargetType();
}

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

import sun.jvm.hotspot.debugger.Address;
import sun.jvm.hotspot.debugger.DebuggerException;
import sun.jvm.hotspot.debugger.UnmappedAddressException;

public abstract interface ProcessControl
{
  public abstract void suspend()
    throws DebuggerException;
  
  public abstract void resume()
    throws DebuggerException;
  
  public abstract boolean isSuspended()
    throws DebuggerException;
  
  public abstract void setBreakpoint(Address paramAddress)
    throws UnmappedAddressException, DebuggerException;
  
  public abstract void clearBreakpoint(Address paramAddress)
    throws DebuggerException;
  
  public abstract boolean isBreakpointSet(Address paramAddress)
    throws DebuggerException;
  
  public abstract DebugEvent debugEventPoll()
    throws DebuggerException;
  
  public abstract void debugEventContinue()
    throws DebuggerException;
}

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

public abstract interface RefType
  extends Type
{
  public abstract Type getTargetType();
}

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

public abstract interface Sym
{
  public abstract String getName();
  
  public abstract String toString();
  
  public abstract BlockSym asBlock();
  
  public abstract FunctionSym asFunction();
  
  public abstract GlobalSym asGlobal();
  
  public abstract LocalSym asLocal();
  
  public abstract boolean isBlock();
  
  public abstract boolean isFunction();
  
  public abstract boolean isGlobal();
  
  public abstract boolean isLocal();
}

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

import java.util.List;

public abstract interface TemplateType
  extends Type
{
  public abstract int getNumTemplateArguments();
  
  public abstract Type instantiate(Type[] paramArrayOfType);
  
  public abstract Type instantiate(List paramList);
}

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

import sun.jvm.hotspot.debugger.Address;

public abstract interface Type
{
  public abstract String getName();
  
  public abstract int getSize();
  
  public abstract BitType asBit();
  
  public abstract IntType asInt();
  
  public abstract EnumType asEnum();
  
  public abstract FloatType asFloat();
  
  public abstract DoubleType asDouble();
  
  public abstract PointerType asPointer();
  
  public abstract ArrayType asArray();
  
  public abstract RefType asRef();
  
  public abstract CompoundType asCompound();
  
  public abstract FunctionType asFunction();
  
  public abstract MemberFunctionType asMemberFunction();
  
  public abstract VoidType asVoid();
  
  public abstract boolean isBit();
  
  public abstract boolean isInt();
  
  public abstract boolean isEnum();
  
  public abstract boolean isFloat();
  
  public abstract boolean isDouble();
  
  public abstract boolean isPointer();
  
  public abstract boolean isArray();
  
  public abstract boolean isRef();
  
  public abstract boolean isCompound();
  
  public abstract boolean isFunction();
  
  public abstract boolean isMemberFunction();
  
  public abstract boolean isVoid();
  
  public abstract boolean isConst();
  
  public abstract boolean isVolatile();
  
  public abstract void iterateObject(Address paramAddress, ObjectVisitor paramObjectVisitor);
  
  public abstract void iterateObject(Address paramAddress, ObjectVisitor paramObjectVisitor, FieldIdentifier paramFieldIdentifier);
  
  public abstract String toString();
}

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

public abstract interface TypeVisitor
{
  public abstract void doBitType(BitType paramBitType);
  
  public abstract void doIntType(IntType paramIntType);
  
  public abstract void doEnumType(EnumType paramEnumType);
  
  public abstract void doFloatType(FloatType paramFloatType);
  
  public abstract void doDoubleType(DoubleType paramDoubleType);
  
  public abstract void doPointerType(PointerType paramPointerType);
  
  public abstract void doArrayType(ArrayType paramArrayType);
  
  public abstract void doRefType(RefType paramRefType);
  
  public abstract void doCompoundType(CompoundType paramCompoundType);
  
  public abstract void doFunctionType(FunctionType paramFunctionType);
  
  public abstract void doMemberFunctionType(MemberFunctionType paramMemberFunctionType);
  
  public abstract void doVoidType(VoidType paramVoidType);
}

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

public abstract interface VoidType
  extends Type
{}

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

import java.io.IOException;

public abstract interface DataSource
{
  public abstract byte readByte()
    throws IOException;
  
  public abstract short readShort()
    throws IOException;
  
  public abstract int readInt()
    throws IOException;
  
  public abstract long readLong()
    throws IOException;
  
  public abstract int read(byte[] paramArrayOfByte)
    throws IOException;
  
  public abstract void seek(long paramLong)
    throws IOException;
  
  public abstract long getFilePointer()
    throws IOException;
  
  public abstract void close()
    throws IOException;
}

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

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

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

import sun.jvm.hotspot.debugger.Address;
import sun.jvm.hotspot.debugger.DebuggerException;
import sun.jvm.hotspot.debugger.JVMDebugger;

public abstract interface DbxDebugger
  extends JVMDebugger
{
  public abstract String addressValueToString(long paramLong)
    throws DebuggerException;
  
  public abstract boolean readJBoolean(long paramLong)
    throws DebuggerException;
  
  public abstract byte readJByte(long paramLong)
    throws DebuggerException;
  
  public abstract char readJChar(long paramLong)
    throws DebuggerException;
  
  public abstract double readJDouble(long paramLong)
    throws DebuggerException;
  
  public abstract float readJFloat(long paramLong)
    throws DebuggerException;
  
  public abstract int readJInt(long paramLong)
    throws DebuggerException;
  
  public abstract long readJLong(long paramLong)
    throws DebuggerException;
  
  public abstract short readJShort(long paramLong)
    throws DebuggerException;
  
  public abstract long readCInteger(long paramLong1, long paramLong2, boolean paramBoolean)
    throws DebuggerException;
  
  public abstract DbxAddress readAddress(long paramLong)
    throws DebuggerException;
  
  public abstract DbxAddress readCompOopAddress(long paramLong)
    throws DebuggerException;
  
  public abstract DbxOopHandle readOopHandle(long paramLong)
    throws DebuggerException;
  
  public abstract DbxOopHandle readCompOopHandle(long paramLong)
    throws DebuggerException;
  
  public abstract long[] getThreadIntegerRegisterSet(int paramInt)
    throws DebuggerException;
  
  public abstract Address newAddress(long paramLong)
    throws DebuggerException;
}

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

import java.io.BufferedInputStream;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.PrintStream;
import java.io.PrintWriter;
import java.io.StringReader;
import java.net.InetAddress;
import java.net.Socket;
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.InputLexer;
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.dbx.sparc.DbxSPARCThreadFactory;
import sun.jvm.hotspot.debugger.dbx.x86.DbxX86ThreadFactory;
import sun.jvm.hotspot.utilities.Assert;
import sun.jvm.hotspot.utilities.PlatformInfo;
import sun.jvm.hotspot.utilities.StreamMonitor;

public class DbxDebuggerLocal
  extends DebuggerBase
  implements DbxDebugger
{
  protected boolean unalignedAccessesOkay;
  protected DbxThreadFactory threadFactory;
  private String dbxPathName;
  private String[] dbxSvcAgentDSOPathNames;
  private Process dbxProcess;
  private StreamMonitor dbxOutStreamMonitor;
  private StreamMonitor dbxErrStreamMonitor;
  private PrintWriter dbxOstr;
  private PrintWriter out;
  private InputLexer in;
  private Socket importModuleSocket;
  private static final int PORT = 21928;
  private static final int LONG_TIMEOUT = 60000;
  private static final int DBX_MODULE_NOT_FOUND = 101;
  private static final int DBX_MODULE_LOADED = 102;
  
  public DbxDebuggerLocal(MachineDescription machDesc, String dbxPathName, String[] dbxSvcAgentDSOPathNames, boolean useCache)
  {
    this.machDesc = machDesc;
    this.dbxPathName = dbxPathName;
    this.dbxSvcAgentDSOPathNames = dbxSvcAgentDSOPathNames;
    if (PlatformInfo.getCPU().equals("sparc"))
    {
      int cacheNumPages = parseCacheNumPagesProperty(2048);
      int cachePageSize = 8192;
      threadFactory = new DbxSPARCThreadFactory(this);
    }
    else if (PlatformInfo.getCPU().equals("x86"))
    {
      int cacheNumPages = 4096;
      int cachePageSize = 4096;
      threadFactory = new DbxX86ThreadFactory(this);
      unalignedAccessesOkay = true;
    }
    else
    {
      throw new RuntimeException("Thread access for CPU architecture " + PlatformInfo.getCPU() + " not yet supported");
    }
    int cachePageSize;
    int cacheNumPages;
    if (useCache) {
      initCache(cachePageSize, cacheNumPages);
    }
  }
  
  protected DbxDebuggerLocal() {}
  
  public boolean hasProcessList()
    throws DebuggerException
  {
    return false;
  }
  
  public List getProcessList()
    throws DebuggerException
  {
    throw new DebuggerException("Not yet supported");
  }
  
  public synchronized void attach(int processID)
    throws DebuggerException
  {
    try
    {
      launchProcess();
      dbxErrStreamMonitor.addTrigger("dbx: no process", 1);
      dbxErrStreamMonitor.addTrigger("dbx: Cannot open", 1);
      dbxErrStreamMonitor.addTrigger("dbx: Cannot find", 101);
      dbxOstr = new PrintWriter(dbxProcess.getOutputStream(), true);
      dbxOstr.println("debug - " + processID);
      dbxOstr.println("kprint -u2 \\(ready\\)");
      boolean seen = dbxErrStreamMonitor.waitFor("(ready)", 60000L);
      if (!seen)
      {
        detach();
        throw new DebuggerException("Timed out while connecting to process " + processID);
      }
      List retVals = dbxErrStreamMonitor.getTriggersSeen();
      if (retVals.contains(new Integer(1)))
      {
        detach();
        throw new DebuggerException("No such process " + processID);
      }
      importDbxModule();
      
      dbxOstr.println("svc_agent_run");
      
      connectToImportModule();
      
      printlnToOutput("peek_fail_fast 1");
    }
    catch (IOException e)
    {
      detach();
      throw new DebuggerException("Error while connecting to dbx process", e);
    }
  }
  
  public synchronized void attach(String executableName, String coreFileName)
    throws DebuggerException
  {
    try
    {
      launchProcess();
      
      dbxErrStreamMonitor.addTrigger("dbx: Cannot open", 1);
      
      dbxErrStreamMonitor.addTrigger("dbx: can't read", 2);
      
      dbxErrStreamMonitor.addTrigger("dbx: File", 3);
      
      dbxErrStreamMonitor.addTrigger("dbx: Unable to read", 4);
      
      dbxErrStreamMonitor.addTrigger("dbx: core object name", 5);
      
      dbxErrStreamMonitor.addTrigger("dbx: can't stat", 6);
      
      dbxOstr = new PrintWriter(dbxProcess.getOutputStream(), true);
      dbxOstr.println("debug " + executableName + " " + coreFileName);
      dbxOstr.println("kprint -u2 \\(ready\\)");
      boolean seen = dbxErrStreamMonitor.waitFor("(ready)", 60000L);
      if (!seen)
      {
        detach();
        throw new DebuggerException("Timed out while attaching to core file");
      }
      List retVals = dbxErrStreamMonitor.getTriggersSeen();
      if (retVals.size() > 0)
      {
        detach();
        if (retVals.contains(new Integer(1))) {
          throw new DebuggerException("Can not find executable \"" + executableName + "\"");
        }
        if (retVals.contains(new Integer(2))) {
          throw new DebuggerException("Can not find core file \"" + coreFileName + "\"");
        }
        if (retVals.contains(new Integer(3))) {
          throw new DebuggerException("Corrupt executable \"" + executableName + "\"");
        }
        if (retVals.contains(new Integer(4))) {
          throw new DebuggerException("Corrupt core file \"" + coreFileName + "\"");
        }
        if (retVals.contains(new Integer(5))) {
          throw new DebuggerException("Mismatched core file/executable \"" + coreFileName + "\"/\"" + executableName + "\"");
        }
        throw new DebuggerException("Couldn't find all loaded libraries for executable \"" + executableName + "\"");
      }
      importDbxModule();
      
      dbxOstr.println("svc_agent_run");
      
      connectToImportModule();
      
      printlnToOutput("peek_fail_fast 1");
    }
    catch (IOException e)
    {
      detach();
      throw new DebuggerException("Error while connecting to dbx process", e);
    }
  }
  
  public synchronized boolean detach()
  {
    try
    {
      if (dbxProcess == null) {
        return false;
      }
      if ((out != null) && (dbxOstr != null))
      {
        printlnToOutput("exit");
        dbxOstr.println("exit");
        try
        {
          Thread.sleep(500L);
        }
        catch (InterruptedException e) {}
      }
      shutdown();
      
      return true;
    }
    catch (IOException e)
    {
      e.printStackTrace();
    }
    return false;
  }
  
  public Address parseAddress(String addressString)
    throws NumberFormatException
  {
    long addr = utils.scanAddress(addressString);
    if (addr == 0L) {
      return null;
    }
    return new DbxAddress(this, addr);
  }
  
  public String getOS()
  {
    return PlatformInfo.getOS();
  }
  
  public String getCPU()
  {
    return PlatformInfo.getCPU();
  }
  
  public boolean hasConsole()
    throws DebuggerException
  {
    return true;
  }
  
  public synchronized String consoleExecuteCommand(String cmd)
    throws DebuggerException
  {
    try
    {
      printlnToOutput("exit");
      importModuleSocket.close();
      importModuleSocket = null;
      out = null;
      in = null;
      dbxOstr.println("kprint \\(ready\\)");
      dbxOstr.flush();
      dbxOutStreamMonitor.waitFor("(ready)", 60000L);
      
      dbxOutStreamMonitor.startCapture();
      dbxErrStreamMonitor.startCapture();
      dbxOstr.println(cmd);
      dbxOstr.println("kprint \\(ready\\)");
      dbxOutStreamMonitor.waitFor("(ready)", 60000L);
      String result = dbxOutStreamMonitor.stopCapture();
      String result2 = dbxErrStreamMonitor.stopCapture();
      result = result + result2;
      
      StringBuffer outBuf = new StringBuffer(result.length());
      BufferedReader reader = new BufferedReader(new StringReader(result));
      
      String line = null;
      do
      {
        line = reader.readLine();
        if ((line != null) && (!line.equals("(ready)")))
        {
          outBuf.append(line);
          outBuf.append("\n");
        }
      } while (line != null);
      dbxOstr.println("svc_agent_run");
      dbxOstr.flus
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