sa-jdi

eObject(Address a, ObjectVisitor v, FieldIdentifier f)
  {
    long val = a.getCIntegerAt(0L, getSize(), isUnsigned());
    v.doEnum(f, val, enumNameForValue(val));
  }
  
  protected Type createCVVariant(int cvAttributes)
  {
    BasicEnumType t = new BasicEnumType(getName(), underlyingType, cvAttributes);
    enums = enums;
    return t;
  }
  
  public void visit(TypeVisitor v)
  {
    v.doEnumType(this);
  }
}

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

import sun.jvm.hotspot.debugger.Address;
import sun.jvm.hotspot.debugger.cdbg.Field;
import sun.jvm.hotspot.debugger.cdbg.GlobalSym;
import sun.jvm.hotspot.debugger.cdbg.Type;

public class BasicField
  implements Field
{
  private String name;
  private Type type;
  private int accessControl;
  private boolean isStatic;
  private long offset;
  private Address address;
  
  public BasicField(String name, Type type, int accessControl, boolean isStatic)
  {
    this.name = name;
    this.type = type;
    this.accessControl = accessControl;
  }
  
  public int getAccessControl()
  {
    return accessControl;
  }
  
  public String getName()
  {
    return name;
  }
  
  public Type getType()
  {
    return type;
  }
  
  public boolean isStatic()
  {
    return isStatic;
  }
  
  public void setOffset(long offset)
  {
    if (isStatic) {
      throw new RuntimeException("Nonstatic fields only");
    }
    this.offset = offset;
  }
  
  public long getOffset()
  {
    if (isStatic) {
      throw new RuntimeException("Nonstatic fields only");
    }
    return offset;
  }
  
  public void setAddress(Address address)
  {
    if (!isStatic) {
      throw new RuntimeException("Static fields only");
    }
    this.address = address;
  }
  
  public Address getAddress()
  {
    if (!isStatic) {
      throw new RuntimeException("Static fields only");
    }
    return address;
  }
  
  public void resolveTypes(Type containingType, BasicCDebugInfoDataBase db, ResolveListener listener)
  {
    type = db.resolveType(containingType, type, listener, "resolving field type");
    if ((isStatic) && 
      (address == null))
    {
      String fieldSymName = getType().getName() + "::" + getName();
      GlobalSym sym = db.lookupSym(fieldSymName);
      if (sym == null) {
        listener.resolveFailed(getType(), getName());
      } else {
        address = sym.getAddress();
      }
    }
  }
}

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

import sun.jvm.hotspot.debugger.Address;
import sun.jvm.hotspot.debugger.cdbg.FieldIdentifier;
import sun.jvm.hotspot.debugger.cdbg.FloatType;
import sun.jvm.hotspot.debugger.cdbg.ObjectVisitor;
import sun.jvm.hotspot.debugger.cdbg.Type;
import sun.jvm.hotspot.debugger.cdbg.TypeVisitor;

public class BasicFloatType
  extends BasicType
  implements FloatType
{
  public BasicFloatType(String name, int size)
  {
    this(name, size, 0);
  }
  
  private BasicFloatType(String name, int size, int cvAttributes)
  {
    super(name, size, cvAttributes);
  }
  
  public FloatType asFloat()
  {
    return this;
  }
  
  public void iterateObject(Address a, ObjectVisitor v, FieldIdentifier f)
  {
    v.doFloat(f, a.getJFloatAt(0L));
  }
  
  protected Type createCVVariant(int cvAttributes)
  {
    return new BasicFloatType(getName(), getSize(), cvAttributes);
  }
  
  public void visit(TypeVisitor v)
  {
    v.doFloatType(this);
  }
}

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

import sun.jvm.hotspot.debugger.Address;
import sun.jvm.hotspot.debugger.cdbg.BlockSym;
import sun.jvm.hotspot.debugger.cdbg.FunctionSym;
import sun.jvm.hotspot.debugger.cdbg.FunctionType;
import sun.jvm.hotspot.debugger.cdbg.Type;

public class BasicFunctionSym
  extends BasicBlockSym
  implements FunctionSym
{
  private Type type;
  private boolean isModuleLocal;
  
  public BasicFunctionSym(BlockSym parent, long length, Address addr, String name, Type type, boolean isModuleLocal)
  {
    super(parent, length, addr, name);
    this.type = type;
    this.isModuleLocal = isModuleLocal;
  }
  
  public FunctionSym asFunction()
  {
    return this;
  }
  
  public Type getType()
  {
    return type;
  }
  
  public boolean isModuleLocal()
  {
    return isModuleLocal;
  }
  
  public void resolve(BasicCDebugInfoDataBase db, ResolveListener listener)
  {
    super.resolve(db, listener);
    type = db.resolveType(this, type, listener, "resolving type of function symbol");
  }
  
  public String toString()
  {
    if (getName() == null) {
      return null;
    }
    StringBuffer res = new StringBuffer();
    res.append(getName());
    res.append("(");
    FunctionType type = (FunctionType)getType();
    if (type != null)
    {
      int nargs = type.getNumArguments();
      for (int i = 0; i < nargs; i++)
      {
        res.append(type.getArgumentType(i).toString());
        if (i != nargs - 1) {
          res.append(", ");
        }
      }
    }
    res.append(")");
    return res.toString();
  }
}

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

import java.util.ArrayList;
import java.util.List;
import java.util.ListIterator;
import sun.jvm.hotspot.debugger.Address;
import sun.jvm.hotspot.debugger.cdbg.FieldIdentifier;
import sun.jvm.hotspot.debugger.cdbg.FunctionType;
import sun.jvm.hotspot.debugger.cdbg.ObjectVisitor;
import sun.jvm.hotspot.debugger.cdbg.Type;
import sun.jvm.hotspot.debugger.cdbg.TypeVisitor;

public class BasicFunctionType
  extends BasicType
  implements FunctionType
{
  private Type returnType;
  private List argumentTypes;
  
  public BasicFunctionType(String name, int size, Type returnType)
  {
    this(name, size, returnType, 0);
  }
  
  protected BasicFunctionType(String name, int size, Type returnType, int cvAttributes)
  {
    super(name, size, cvAttributes);
    this.returnType = returnType;
  }
  
  public FunctionType asFunction()
  {
    return this;
  }
  
  public Type getReturnType()
  {
    return returnType;
  }
  
  public int getNumArguments()
  {
    return argumentTypes == null ? 0 : argumentTypes.size();
  }
  
  public Type getArgumentType(int i)
  {
    return (Type)argumentTypes.get(i);
  }
  
  public void addArgumentType(Type t)
  {
    if (argumentTypes == null) {
      argumentTypes = new ArrayList();
    }
    argumentTypes.add(t);
  }
  
  Type resolveTypes(BasicCDebugInfoDataBase db, ResolveListener listener)
  {
    super.resolveTypes(db, listener);
    returnType = db.resolveType(this, returnType, listener, "resolving function return type");
    ListIterator iter;
    if (argumentTypes != null) {
      for (iter = argumentTypes.listIterator(); iter.hasNext();) {
        iter.set(db.resolveType(this, (Type)iter.next(), listener, "resolving function argument types"));
      }
    }
    return this;
  }
  
  public void iterateObject(Address a, ObjectVisitor v, FieldIdentifier f) {}
  
  protected Type createCVVariant(int cvAttributes)
  {
    BasicFunctionType t = new BasicFunctionType(getName(), getSize(), getReturnType(), cvAttributes);
    argumentTypes = argumentTypes;
    return t;
  }
  
  public void visit(TypeVisitor v)
  {
    v.doFunctionType(this);
  }
}

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

import sun.jvm.hotspot.debugger.Address;
import sun.jvm.hotspot.debugger.cdbg.GlobalSym;
import sun.jvm.hotspot.debugger.cdbg.Type;

public class BasicGlobalSym
  extends BasicSym
  implements GlobalSym
{
  private Type type;
  private Address addr;
  private boolean isModuleLocal;
  
  public BasicGlobalSym(String name, Type type, Address addr, boolean isModuleLocal)
  {
    super(name);
    this.type = type;
    this.addr = addr;
    this.isModuleLocal = isModuleLocal;
  }
  
  public GlobalSym asGlobal()
  {
    return this;
  }
  
  public Type getType()
  {
    return type;
  }
  
  public Address getAddress()
  {
    return addr;
  }
  
  public boolean isModuleLocal()
  {
    return isModuleLocal;
  }
  
  public void resolve(BasicCDebugInfoDataBase db, ResolveListener listener)
  {
    type = db.resolveType(this, type, listener, "resolving type of global");
  }
}

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

import sun.jvm.hotspot.debugger.cdbg.IndexableFieldIdentifier;
import sun.jvm.hotspot.debugger.cdbg.Type;

public class BasicIndexableFieldIdentifier
  implements IndexableFieldIdentifier
{
  private Type type;
  private int index;
  
  public BasicIndexableFieldIdentifier(Type type, int index)
  {
    this.type = type;
    this.index = index;
  }
  
  public Type getType()
  {
    return type;
  }
  
  public int getIndex()
  {
    return index;
  }
  
  public String toString()
  {
    return Integer.toString(getIndex());
  }
}

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

import sun.jvm.hotspot.debugger.Address;
import sun.jvm.hotspot.debugger.cdbg.FieldIdentifier;
import sun.jvm.hotspot.debugger.cdbg.IntType;
import sun.jvm.hotspot.debugger.cdbg.ObjectVisitor;
import sun.jvm.hotspot.debugger.cdbg.Type;
import sun.jvm.hotspot.debugger.cdbg.TypeVisitor;

public class BasicIntType
  extends BasicType
  implements IntType
{
  private boolean unsigned;
  
  public BasicIntType(String name, int size, boolean unsigned)
  {
    this(name, size, unsigned, 0);
  }
  
  protected BasicIntType(String name, int size, boolean unsigned, int cvAttributes)
  {
    super(name, size, cvAttributes);
    this.unsigned = unsigned;
  }
  
  public IntType asInt()
  {
    return this;
  }
  
  public int getIntSize()
  {
    return getSize();
  }
  
  public boolean isUnsigned()
  {
    return unsigned;
  }
  
  public void iterateObject(Address a, ObjectVisitor v, FieldIdentifier f)
  {
    v.doInt(f, a.getCIntegerAt(0L, getSize(), isUnsigned()));
  }
  
  protected Type createCVVariant(int cvAttributes)
  {
    return new BasicIntType(getName(), getSize(), isUnsigned(), cvAttributes);
  }
  
  public void visit(TypeVisitor v)
  {
    v.doIntType(this);
  }
}

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

import sun.jvm.hotspot.debugger.Address;
import sun.jvm.hotspot.debugger.cdbg.LineNumberInfo;

public class BasicLineNumberInfo
  implements LineNumberInfo
{
  private String sourceFileName;
  private int lineNo;
  private Address startPC;
  private Address endPC;
  
  public BasicLineNumberInfo(String sourceFileName, int lineNo, Address startPC, Address endPC)
  {
    this.sourceFileName = sourceFileName;
    this.lineNo = lineNo;
    this.startPC = startPC;
    this.endPC = endPC;
  }
  
  public String getSourceFileName()
  {
    return sourceFileName;
  }
  
  public int getLineNumber()
  {
    return lineNo;
  }
  
  public Address getStartPC()
  {
    return startPC;
  }
  
  public Address getEndPC()
  {
    return endPC;
  }
  
  public void setEndPC(Address pc)
  {
    endPC = pc;
  }
}

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

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

final class BasicLineNumberMapping$1
  implements Comparator
{
  private final BasicLineNumberMapping this$0;
  
  BasicLineNumberMapping$1(BasicLineNumberMapping paramBasicLineNumberMapping) {}
  
  public int compare(Object o1, Object o2)
  {
    BasicLineNumberInfo l1 = (BasicLineNumberInfo)o1;
    BasicLineNumberInfo l2 = (BasicLineNumberInfo)o2;
    Address a1 = l1.getStartPC();
    Address a2 = l2.getStartPC();
    if (AddressOps.lt(a1, a2)) {
      return -1;
    }
    if (AddressOps.gt(a1, a2)) {
      return 1;
    }
    return 0;
  }
}

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

import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import sun.jvm.hotspot.debugger.Address;
import sun.jvm.hotspot.debugger.DebuggerException;
import sun.jvm.hotspot.debugger.cdbg.LineNumberVisitor;
import sun.jvm.hotspot.utilities.AddressOps;

public class BasicLineNumberMapping
{
  private List infoList;
  
  public void addLineNumberInfo(BasicLineNumberInfo info)
  {
    if (infoList == null) {
      infoList = new ArrayList();
    }
    infoList.add(info);
  }
  
  public void sort()
  {
    if (infoList == null) {
      return;
    }
    Collections.sort(infoList, new Comparator()
    {
      public int compare(Object o1, Object o2)
      {
        BasicLineNumberInfo l1 = (BasicLineNumberInfo)o1;
        BasicLineNumberInfo l2 = (BasicLineNumberInfo)o2;
        Address a1 = l1.getStartPC();
        Address a2 = l2.getStartPC();
        if (AddressOps.lt(a1, a2)) {
          return -1;
        }
        if (AddressOps.gt(a1, a2)) {
          return 1;
        }
        return 0;
      }
    });
  }
  
  public void recomputeEndPCs()
  {
    if (infoList == null) {
      return;
    }
    for (int i = 0; i < infoList.size() - 1; i++)
    {
      BasicLineNumberInfo i1 = get(i);
      BasicLineNumberInfo i2 = get(i + 1);
      i1.setEndPC(i2.getStartPC());
    }
  }
  
  public BasicLineNumberInfo lineNumberForPC(Address pc)
    throws DebuggerException
  {
    if (infoList == null) {
      return null;
    }
    return searchLineNumbers(pc, 0, infoList.size() - 1);
  }
  
  public void iterate(LineNumberVisitor v)
  {
    if (infoList == null) {
      return;
    }
    for (int i = 0; i < infoList.size(); i++) {
      v.doLineNumber(get(i));
    }
  }
  
  private BasicLineNumberInfo get(int i)
  {
    return (BasicLineNumberInfo)infoList.get(i);
  }
  
  private BasicLineNumberInfo searchLineNumbers(Address addr, int lowIdx, int highIdx)
  {
    if (highIdx < lowIdx) {
      return null;
    }
    if (lowIdx == highIdx)
    {
      if (check(addr, lowIdx)) {
        return get(lowIdx);
      }
      return null;
    }
    if (lowIdx == highIdx - 1)
    {
      if (check(addr, lowIdx)) {
        return get(lowIdx);
      }
      if (check(addr, highIdx)) {
        return get(highIdx);
      }
      return null;
    }
    int midIdx = lowIdx + highIdx >> 1;
    BasicLineNumberInfo info = get(midIdx);
    if (AddressOps.lt(addr, info.getStartPC())) {
      return searchLineNumbers(addr, lowIdx, midIdx);
    }
    if (AddressOps.equal(addr, info.getStartPC())) {
      return info;
    }
    return searchLineNumbers(addr, midIdx, highIdx);
  }
  
  private boolean check(Address addr, int idx)
  {
    BasicLineNumberInfo info = get(idx);
    if (AddressOps.lte(info.getStartPC(), addr)) {
      return true;
    }
    return false;
  }
}

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

import sun.jvm.hotspot.debugger.cdbg.LocalSym;
import sun.jvm.hotspot.debugger.cdbg.Type;

public class BasicLocalSym
  extends BasicSym
  implements LocalSym
{
  private Type type;
  private long frameOffset;
  
  public BasicLocalSym(String name, Type type, long frameOffset)
  {
    super(name);
    this.type = type;
    this.frameOffset = frameOffset;
  }
  
  public LocalSym asLocal()
  {
    return this;
  }
  
  public Type getType()
  {
    return type;
  }
  
  public long getFrameOffset()
  {
    return frameOffset;
  }
  
  public void resolve(BasicCDebugInfoDataBase db, ResolveListener listener)
  {
    type = db.resolveType(this, type, listener, "resolving type of local");
  }
}

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

import sun.jvm.hotspot.debugger.Address;
import sun.jvm.hotspot.debugger.cdbg.FieldIdentifier;
import sun.jvm.hotspot.debugger.cdbg.MemberFunctionType;
import sun.jvm.hotspot.debugger.cdbg.ObjectVisitor;
import sun.jvm.hotspot.debugger.cdbg.Type;
import sun.jvm.hotspot.debugger.cdbg.TypeVisitor;

public class BasicMemberFunctionType
  extends BasicFunctionType
  implements MemberFunctionType
{
  private Type containingClass;
  private Type thisType;
  private long thisAdjust;
  
  public BasicMemberFunctionType(String name, int size, Type returnType, Type containingClass, Type thisType, long thisAdjust)
  {
    this(name, size, returnType, containingClass, thisType, thisAdjust, 0);
  }
  
  private BasicMemberFunctionType(String name, int size, Type returnType, Type containingClass, Type thisType, long thisAdjust, int cvAttributes)
  {
    super(name, size, returnType, cvAttributes);
    this.containingClass = containingClass;
    this.thisType = thisType;
    this.thisAdjust = thisAdjust;
  }
  
  public MemberFunctionType asMemberFunction()
  {
    return this;
  }
  
  public Type getContainingClass()
  {
    return containingClass;
  }
  
  public Type getThisType()
  {
    return thisType;
  }
  
  public long getThisAdjust()
  {
    return thisAdjust;
  }
  
  Type resolveTypes(BasicCDebugInfoDataBase db, ResolveListener listener)
  {
    super.resolveTypes(db, listener);
    containingClass = db.resolveType(this, containingClass, listener, "resolving member function class");
    thisType = db.resolveType(this, thisType, listener, "resolving member function \"this\" type");
    return this;
  }
  
  public void iterateObject(Address a, ObjectVisitor v, FieldIdentifier f) {}
  
  protected Type createCVVariant(int cvAttributes)
  {
    return new BasicMemberFunctionType(getName(), getSize(), getReturnType(), getContainingClass(), getThisType(), getThisAdjust(), cvAttributes);
  }
  
  public void visit(TypeVisitor v)
  {
    v.doMemberFunctionType(this);
  }
}

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

import sun.jvm.hotspot.debugger.cdbg.Field;
import sun.jvm.hotspot.debugger.cdbg.NamedFieldIdentifier;
import sun.jvm.hotspot.debugger.cdbg.Type;

public class BasicNamedFieldIdentifier
  implements NamedFieldIdentifier
{
  private Field field;
  
  public BasicNamedFieldIdentifier(Field field)
  {
    this.field = field;
  }
  
  public String getName()
  {
    return field.getName();
  }
  
  public Type getType()
  {
    return field.getType();
  }
  
  public String toString()
  {
    return getName();
  }
}

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

import sun.jvm.hotspot.debugger.Address;
import sun.jvm.hotspot.debugger.cdbg.FieldIdentifier;
import sun.jvm.hotspot.debugger.cdbg.ObjectVisitor;
import sun.jvm.hotspot.debugger.cdbg.PointerType;
import sun.jvm.hotspot.debugger.cdbg.Type;
import sun.jvm.hotspot.debugger.cdbg.TypeVisitor;

public class BasicPointerType
  extends BasicType
  implements PointerType
{
  private Type targetType;
  
  public BasicPointerType(int size, Type targetType)
  {
    this(null, size, targetType, 0);
  }
  
  private BasicPointerType(String name, int size, Type targetType, int cvAttributes)
  {
    super(name, size, cvAttributes);
    this.targetType = targetType;
    if (!((BasicType)targetType).isLazy()) {
      computeName();
    }
  }
  
  public PointerType asPointer()
  {
    return this;
  }
  
  public Type getTargetType()
  {
    return targetType;
  }
  
  Type resolveTypes(BasicCDebugInfoDataBase db, ResolveListener listener)
  {
    super.resolveTypes(db, listener);
    targetType = db.resolveType(this, targetType, listener, "resolving pointer type");
    computeName();
    return this;
  }
  
  public void iterateObject(Address a, ObjectVisitor v, FieldIdentifier f)
  {
    v.doPointer(f, a.getAddressAt(0L));
  }
  
  protected Type createCVVariant(int cvAttributes)
  {
    return new BasicPointerType(getName(), getSize(), getTargetType(), cvAttributes);
  }
  
  public void visit(TypeVisitor v)
  {
    v.doPointerType(this);
  }
  
  private void computeName()
  {
    setName(targetType.getName() + " *");
  }
}

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

import sun.jvm.hotspot.debugger.Address;
import sun.jvm.hotspot.debugger.cdbg.FieldIdentifier;
import sun.jvm.hotspot.debugger.cdbg.ObjectVisitor;
import sun.jvm.hotspot.debugger.cdbg.RefType;
import sun.jvm.hotspot.debugger.cdbg.Type;
import sun.jvm.hotspot.debugger.cdbg.TypeVisitor;

public class BasicRefType
  extends BasicType
  implements RefType
{
  private Type targetType;
  
  public BasicRefType(String name, int size, Type targetType)
  {
    this(name, size, targetType, 0);
  }
  
  private BasicRefType(String name, int size, Type targetType, int cvAttributes)
  {
    super(name, size, cvAttributes);
    this.targetType = targetType;
    if (!((BasicType)targetType).isLazy()) {
      computeName();
    }
  }
  
  public RefType asRef()
  {
    return this;
  }
  
  public Type getTargetType()
  {
    return targetType;
  }
  
  Type resolveTypes(BasicCDebugInfoDataBase db, ResolveListener listener)
  {
    super.resolveTypes(db, listener);
    targetType = db.resolveType(this, targetType, listener, "resolving ref type");
    computeName();
    return this;
  }
  
  public void iterateObject(Address a, ObjectVisitor v, FieldIdentifier f)
  {
    v.doRef(f, a.getAddressAt(0L));
  }
  
  protected Type createCVVariant(int cvAttributes)
  {
    return new BasicRefType(getName(), getSize(), getTargetType(), cvAttributes);
  }
  
  public void visit(TypeVisitor v)
  {
    v.doRefType(this);
  }
  
  private void computeName()
  {
    setName(targetType.getName() + " &");
  }
}

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

import sun.jvm.hotspot.debugger.cdbg.BlockSym;
import sun.jvm.hotspot.debugger.cdbg.FunctionSym;
import sun.jvm.hotspot.debugger.cdbg.GlobalSym;
import sun.jvm.hotspot.debugger.cdbg.LocalSym;
import sun.jvm.hotspot.debugger.cdbg.Sym;

public abstract class BasicSym
  implements Sym
{
  private String name;
  
  protected BasicSym(String name)
  {
    this.name = name;
  }
  
  public String getName()
  {
    return name;
  }
  
  public String toString()
  {
    return getName();
  }
  
  public BlockSym asBlock()
  {
    return null;
  }
  
  public FunctionSym asFunction()
  {
    return null;
  }
  
  public GlobalSym asGlobal()
  {
    return null;
  }
  
  public LocalSym asLocal()
  {
    return null;
  }
  
  public boolean isBlock()
  {
    return asBlock() != null;
  }
  
  public boolean isFunction()
  {
    return asFunction() != null;
  }
  
  public boolean isGlobal()
  {
    return asGlobal() != null;
  }
  
  public boolean isLocal()
  {
    return asLocal() != null;
  }
  
  public boolean isLazy()
  {
    return false;
  }
  
  public abstract void resolve(BasicCDebugInfoDataBase paramBasicCDebugInfoDataBase, ResolveListener paramResolveListener);
}

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

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.ListIterator;
import sun.jvm.hotspot.debugger.Address;
import sun.jvm.hotspot.debugger.cdbg.ArrayType;
import sun.jvm.hotspot.debugger.cdbg.BitType;
import sun.jvm.hotspot.debugger.cdbg.CVAttributes;
import sun.jvm.hotspot.debugger.cdbg.CompoundType;
import sun.jvm.hotspot.debugger.cdbg.DoubleType;
import sun.jvm.hotspot.debugger.cdbg.EnumType;
import sun.jvm.hotspot.debugger.cdbg.FieldIdentifier;
import sun.jvm.hotspot.debugger.cdbg.FloatType;
import sun.jvm.hotspot.debugger.cdbg.FunctionType;
import sun.jvm.hotspot.debugger.cdbg.IntType;
import sun.jvm.hotspot.debugger.cdbg.MemberFunctionType;
import sun.jvm.hotspot.debugger.cdbg.ObjectVisitor;
import sun.jvm.hotspot.debugger.cdbg.PointerType;
import sun.jvm.hotspot.debugger.cdbg.RefType;
import sun.jvm.hotspot.debugger.cdbg.Type;
import sun.jvm.hotspot.debugger.cdbg.TypeVisitor;
import sun.jvm.hotspot.debugger.cdbg.VoidType;

public abstract class BasicType
  implements Type, CVAttributes
{
  private String name;
  private int size;
  private int cvAttributes;
  private List cvVariants;
  
  protected BasicType(String name, int size)
  {
    this(name, size, 0);
  }
  
  protected BasicType(String name, int size, int cvAttributes)
  {
    this.name = name;
    this.size = size;
    this.cvAttributes = cvAttributes;
  }
  
  public String getName()
  {
    return name;
  }
  
  protected void setName(String name)
  {
    this.name = name;
  }
  
  public int getSize()
  {
    return size;
  }
  
  public BitType asBit()
  {
    return null;
  }
  
  public IntType asInt()
  {
    return null;
  }
  
  public EnumType asEnum()
  {
    return null;
  }
  
  public FloatType asFloat()
  {
    return null;
  }
  
  public DoubleType asDouble()
  {
    return null;
  }
  
  public PointerType asPointer()
  {
    return null;
  }
  
  public ArrayType asArray()
  {
    return null;
  }
  
  public RefType asRef()
  {
    return null;
  }
  
  public CompoundType asCompound()
  {
    return null;
  }
  
  public FunctionType asFunction()
  {
    return null;
  }
  
  public MemberFunctionType asMemberFunction()
  {
    return null;
  }
  
  public VoidType asVoid()
  {
    return null;
  }
  
  public boolean isBit()
  {
    return asBit() != null;
  }
  
  public boolean isInt()
  {
    return asInt() != null;
  }
  
  public boolean isEnum()
  {
    return asEnum() != null;
  }
  
  public boolean isFloat()
  {
    return asFloat() != null;
  }
  
  public boolean isDouble()
  {
    return asDouble() != null;
  }
  
  public boolean isPointer()
  {
    return asPointer() != null;
  }
  
  public boolean isArray()
  {
    return asArray() != null;
  }
  
  public boolean isRef()
  {
    return asRef() != null;
  }
  
  public boolean isCompound()
  {
    return asCompound() != null;
  }
  
  public boolean isFunction()
  {
    return asFunction() != null;
  }
  
  public boolean isMemberFunction()
  {
    return asMemberFunction() != null;
  }
  
  public boolean isVoid()
  {
    return asVoid() != null;
  }
  
  public boolean isConst()
  {
    return (cvAttributes & 0x1) != 0;
  }
  
  public boolean isVolatile()
  {
    return (cvAttributes & 0x2) != 0;
  }
  
  Type resolveTypes(BasicCDebugInfoDataBase db, ResolveListener listener)
  {
    ListIterator iter;
    if (cvVariants != null) {
      for (iter = cvVariants.listIterator(); iter.hasNext();) {
        iter.set(db.resolveType(this, (BasicType)iter.next(), listener, "resolving const/var variants"));
      }
    }
    return this;
  }
  
  public boolean isLazy()
  {
    return false;
  }
  
  public void iterateObject(Address a, ObjectVisitor v)
  {
    iterateObject(a, v, null);
  }
  
  public abstract void iterateObject(Address paramAddress, ObjectVisitor paramObjectVisitor, FieldIdentifier paramFieldIdentifier);
  
  public Type getCVVariant(int cvAttributes)
  {
    Type t = findCVVariant(cvAttributes);
    if (t != null) {
      return t;
    }
    t = createCVVariant(cvAttributes);
    addCVVariant(t);
    return t;
  }
  
  public String toString()
  {
    return getName();
  }
  
  private int getCVAttributes()
  {
    return cvAttributes;
  }
  
  protected abstract Type createCVVariant(int paramInt);
  
  protected Type findCVVariant(int cvAttributes)
  {
    Iterator iter;
    if (cvVariants != null) {
      for (iter = cvVariants.iterator(); iter.hasNext();)
      {
        BasicType t = (BasicType)iter.next();
        if (t.getCVAttributes() == cvAttributes) {
          return t;
        }
      }
    }
    return null;
  }
  
  protected void addCVVariant(Type t)
  {
    if (cvVariants == null) {
      cvVariants = new ArrayList();
    }
    cvVariants.add(t);
  }
  
  public abstract void visit(TypeVisitor paramTypeVisitor);
}

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

import java.io.PrintStream;
import sun.jvm.hotspot.debugger.Address;
import sun.jvm.hotspot.debugger.cdbg.FieldIdentifier;
import sun.jvm.hotspot.debugger.cdbg.ObjectVisitor;
import sun.jvm.hotspot.debugger.cdbg.Type;
import sun.jvm.hotspot.debugger.cdbg.TypeVisitor;
import sun.jvm.hotspot.debugger.cdbg.VoidType;

public class BasicVoidType
  extends BasicType
  implements VoidType
{
  public BasicVoidType()
  {
    super("void", 0);
  }
  
  public VoidType asVoid()
  {
    return this;
  }
  
  public void iterateObject(Address a, ObjectVisitor v, FieldIdentifier f) {}
  
  protected Type createCVVariant(int cvAttributes)
  {
    System.err.println("WARNING: Should not attempt to create const/volatile variants for void type");
    return this;
  }
  
  public void visit(TypeVisitor v)
  {
    v.doVoidType(this);
  }
}

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

public class CompoundTypeKind
{
  public static final CompoundTypeKind CLASS = new CompoundTypeKind();
  public static final CompoundTypeKind STRUCT = new CompoundTypeKind();
  public static final CompoundTypeKind UNION = new CompoundTypeKind();
}

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

import sun.jvm.hotspot.debugger.Address;
import sun.jvm.hotspot.debugger.cdbg.BlockSym;
import sun.jvm.hotspot.debugger.cdbg.LocalSym;

public class LazyBlockSym
  extends BasicSym
  implements BlockSym
{
  private Object key;
  
  public LazyBlockSym(Object key)
  {
    super(null);
    this.key = key;
  }
  
  public BlockSym asBlock()
  {
    return this;
  }
  
  public boolean isLazy()
  {
    return true;
  }
  
  public Object getKey()
  {
    return key;
  }
  
  public BlockSym getParent()
  {
    return null;
  }
  
  public long getLength()
  {
    return 0L;
  }
  
  public Address getAddress()
  {
    return null;
  }
  
  public int getNumLocals()
  {
    return 0;
  }
  
  public LocalSym getLocal(int i)
  {
    throw new RuntimeException("Should not call this");
  }
  
  public void resolve(BasicCDebugInfoDataBase db, ResolveListener listener) {}
}

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

import sun.jvm.hotspot.debugger.Address;
import sun.jvm.hotspot.debugger.cdbg.FieldIdentifier;
import sun.jvm.hotspot.debugger.cdbg.ObjectVisitor;
import sun.jvm.hotspot.debugger.cdbg.Type;
import sun.jvm.hotspot.debugger.cdbg.TypeVisitor;
import sun.jvm.hotspot.utilities.Assert;

public class LazyType
  extends BasicType
{
  private Object key;
  private int cvAttributes;
  
  public LazyType(Object key)
  {
    this(key, 0);
  }
  
  private LazyType(Object key, int cvAttributes)
  {
    super(null, 0, cvAttributes);
    if (Assert.ASSERTS_ENABLED) {
      Assert.that(key != null, "key must not be null");
    }
    this.key = key;
    this.cvAttributes = cvAttributes;
  }
  
  public boolean isLazy()
  {
    return true;
  }
  
  public Object getKey()
  {
    return key;
  }
  
  Type resolveTypes(BasicCDebugInfoDataBase db, ResolveListener listener)
  {
    BasicType t = (BasicType)db.resolveType(this, this, listener, "resolving lazy type");
    if (t.isLazy()) {
      return this;
    }
    if (cvAttributes != 0) {
      return t.getCVVariant(cvAttributes);
    }
    return t;
  }
  
  public void iterateObject(Address a, ObjectVisitor v, FieldIdentifier f) {}
  
  protected Type createCVVariant(int cvAttributes)
  {
    return new LazyType(key, cvAttributes);
  }
  
  public void visit(TypeVisitor v) {}
}

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

import sun.jvm.hotspot.debugger.cdbg.Sym;
import sun.jvm.hotspot.debugger.cdbg.Type;

public abstract interface ResolveListener
{
  public abstract void resolveFailed(Type paramType, LazyType paramLazyType, String paramString);
  
  public abstract void resolveFailed(Type paramType, String paramString);
  
  public abstract void resolveFailed(Sym paramSym, LazyType paramLazyType, String paramString);
  
  public abstract void resolveFailed(Sym paramSym, LazyBlockSym paramLazyBlockSym, String paramString);
}

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

import sun.jvm.hotspot.debugger.Address;
import sun.jvm.hotspot.debugger.ThreadProxy;
import sun.jvm.hotspot.debugger.cdbg.CDebugger;
import sun.jvm.hotspot.debugger.cdbg.CFrame;
import sun.jvm.hotspot.debugger.cdbg.basic.BasicCFrame;
import sun.jvm.hotspot.debugger.x86.X86ThreadContext;

public class X86CFrame
  extends BasicCFrame
{
  private Address ebp;
  private Address pc;
  private static final int ADDRESS_SIZE = 4;
  
  public X86CFrame(CDebugger dbg, Address ebp, Address pc)
  {
    super(dbg);
    this.ebp = ebp;
    this.pc = pc;
  }
  
  public CFrame sender(ThreadProxy thread)
  {
    X86ThreadContext context = (X86ThreadContext)thread.getContext();
    Address esp = context.getRegisterAsAddress(7);
    if ((ebp == null) || (ebp.lessThan(esp))) {
      return null;
    }
    Address nextEBP = ebp.getAddressAt(0L);
    if (nextEBP == null) {
      return null;
    }
    Address nextPC = ebp.getAddressAt(4L);
    if (nextPC == null) {
      return null;
    }
    return new X86CFrame(dbg(), nextEBP, nextPC);
  }
  
  public Address pc()
  {
    return pc;
  }
  
  public Address localVariableBase()
  {
    return ebp;
  }
}

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

public abstract interface BitType
  extends IntType
{
  public abstract int getSizeInBits();
  
  public abstract int getOffset();
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.debugger.cdbg.BitType
 * 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 BlockSym
  extends Sym
{
  public abstract BlockSym getParent();
  
  public abstract long getLength();
  
  public abstract Address getAddress();
  
  public abstract String getName();
  
  public abstract int getNumLocals();
  
  public abstract LocalSym getLocal(int paramInt);
}

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

import java.util.List;
import sun.jvm.hotspot.debugger.Address;
import sun.jvm.hotspot.debugger.DebuggerException;
import sun.jvm.hotspot.debugger.ThreadProxy;

public abstract interface CDebugger
{
  public abstract List getThreadList()
    throws DebuggerException;
  
  public abstract List getLoadObjectList()
    throws DebuggerException;
  
  public abstract LoadObject loadObjectContainingPC(Address paramAddress)
    throws DebuggerException;
  
  public abstract CFrame topFrameForThread(ThreadProxy paramThreadProxy)
    throws DebuggerException, IllegalThreadStateException;
  
  public abstract String getNameOfFile(String paramString)
    throws DebuggerException;
  
  public abstract ProcessControl getProcessControl()
    throws DebuggerException;
  
  public abstract boolean canDemangle();
  
  public abstract String demangle(String paramString)
    throws UnsupportedOperationException;
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.debugger.cdbg.CDebugger
 * 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 CDebugInfoDataBase
{
  public abstract Type lookupType(String paramString);
  
  public abstract Type lookupType(String paramString, int paramInt);
  
  public abstract void iterate(TypeVisitor paramTypeVisitor);
  
  public abstract BlockSym debugInfoForPC(Address paramAddress);
  
  public abstract GlobalSym lookupSym(String paramString);
  
  public abstract LineNumberInfo lineNumberForPC(Address paramAddress)
    throws DebuggerException;
  
  public abstract void iterate(LineNumberVisitor paramLineNumberVisitor);
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.debugger.cdbg.CDebugInfoDataBase
 * 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 CFrame
{
  public abstract CFrame sender(ThreadProxy paramThreadProxy);
  
  public abstract Address pc();
  
  public abstract LoadObject loadObjectForPC();
  
  public abstract BlockSym blockForPC();
  
  public abstract ClosestSymbol closestSymbolToPC();
  
  public abstract Address localVariableBase();
  
  public abstract void iterateLocals(ObjectVisitor paramObjectVisitor);
}

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

public class ClosestSymbol
{
  private String name;
  private long offset;
  
  public ClosestSymbol(String name, long offset)
  {
    this.name = name;
    this.offset = offset;
  }
  
  public String getName()
  {
    return name;
  }
  
  public long getOffset()
  {
    return offset;
  }
  
  public String offsetAsHex()
  {
    return "0x" + Long.toHexString(offset);
  }
}

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

public abstract interface
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