sa-jdi

();
      }
      
      public String getLThreadName()
      {
        return readLengthPrefixedStringAt(10);
      }
      
      private void symSeek(int offsetInSym)
      {
        this$1.seek(pos + 4 + offsetInSym);
      }
      
      private int numericLeafLengthAt(int offsetInSym)
      {
        return COFFFileParser.COFFFileImpl.COFFHeaderImpl.DebugVC50Impl.this.numericLeafLengthAt(pos + 4 + offsetInSym);
      }
      
      private int readIntNumericLeafAt(int offsetInSym)
      {
        return COFFFileParser.COFFFileImpl.COFFHeaderImpl.DebugVC50Impl.this.readIntNumericLeafAt(pos + 4 + offsetInSym);
      }
      
      private long readLongNumericLeafAt(int offsetInSym)
      {
        return COFFFileParser.COFFFileImpl.COFFHeaderImpl.DebugVC50Impl.this.readLongNumericLeafAt(pos + 4 + offsetInSym);
      }
      
      private float readFloatNumericLeafAt(int offsetInSym)
      {
        return COFFFileParser.COFFFileImpl.COFFHeaderImpl.DebugVC50Impl.this.readFloatNumericLeafAt(pos + 4 + offsetInSym);
      }
      
      private double readDoubleNumericLeafAt(int offsetInSym)
      {
        return COFFFileParser.COFFFileImpl.COFFHeaderImpl.DebugVC50Impl.this.readDoubleNumericLeafAt(pos + 4 + offsetInSym);
      }
      
      private int lengthPrefixedStringLengthAt(int offsetInSym)
      {
        return COFFFileParser.COFFFileImpl.COFFHeaderImpl.DebugVC50Impl.this.lengthPrefixedStringLengthAt(pos + 4 + offsetInSym);
      }
      
      private String readLengthPrefixedStringAt(int offsetInSym)
      {
        return COFFFileParser.COFFFileImpl.COFFHeaderImpl.DebugVC50Impl.this.readLengthPrefixedStringAt(pos + 4 + offsetInSym);
      }
    }
    
    class DebugVC50TypeIteratorImpl
      implements DebugVC50TypeIterator, DebugVC50TypeLeafIndices, DebugVC50MemberAttributes, DebugVC50TypeEnums
    {
      private DebugVC50SSGlobalTypes parent;
      private int base;
      private int numTypes;
      private int typeIndex;
      private int typeRecordOffset;
      private int typeStringOffset;
      private int typeRecordSize;
      private int typeStringLeaf;
      
      DebugVC50TypeIteratorImpl(DebugVC50SSGlobalTypes parent, int base, int numTypes)
      {
        this(parent, base, numTypes, 0, base);
      }
      
      private DebugVC50TypeIteratorImpl(DebugVC50SSGlobalTypes parent, int base, int numTypes, int curType, int offset)
      {
        this.parent = parent;
        this.base = base;
        this.numTypes = numTypes;
        typeIndex = curType;
        if (!done())
        {
          typeRecordOffset = offset;
          loadTypeRecord();
        }
      }
      
      public boolean done()
      {
        return typeIndex == numTypes;
      }
      
      public void next()
        throws NoSuchElementException
      {
        if (done()) {
          throw new NoSuchElementException();
        }
        typeIndex += 1;
        if (!done())
        {
          typeRecordOffset = parent.getTypeOffset(typeIndex);
          loadTypeRecord();
        }
      }
      
      public short getLength()
      {
        return (short)typeRecordSize;
      }
      
      public int getTypeIndex()
      {
        return COFFFileParser.COFFFileImpl.COFFHeaderImpl.DebugVC50Impl.this.biasTypeIndex(typeIndex);
      }
      
      public int getNumTypes()
      {
        return numTypes;
      }
      
      public boolean typeStringDone()
      {
        return typeStringOffset - typeRecordOffset - 2 >= typeRecordSize;
      }
      
      public void typeStringNext()
        throws NoSuchElementException
      {
        if (typeStringDone()) {
          throw new NoSuchElementException();
        }
        typeStringOffset += typeStringLength();
        loadTypeString();
      }
      
      public int typeStringLeaf()
      {
        return typeStringLeaf;
      }
      
      public int typeStringOffset()
      {
        return typeStringOffset;
      }
      
      public int getModifierIndex()
      {
        typeSeek(2);
        return this$1.readInt();
      }
      
      public short getModifierAttribute()
      {
        typeSeek(6);
        return this$1.readShort();
      }
      
      public int getPointerType()
      {
        typeSeek(2);
        return this$1.readInt();
      }
      
      public int getPointerAttributes()
      {
        typeSeek(6);
        return this$1.readInt();
      }
      
      public int getPointerBasedOnTypeIndex()
      {
        typeSeek(10);
        return this$1.readInt();
      }
      
      public String getPointerBasedOnTypeName()
      {
        return readLengthPrefixedStringAt(14);
      }
      
      public int getPointerToMemberClass()
      {
        typeSeek(10);
        return this$1.readInt();
      }
      
      public short getPointerToMemberFormat()
      {
        typeSeek(14);
        return this$1.readShort();
      }
      
      public int getArrayElementType()
      {
        typeSeek(2);
        return this$1.readInt();
      }
      
      public int getArrayIndexType()
      {
        typeSeek(6);
        return this$1.readInt();
      }
      
      public int getArrayLength()
        throws DebugVC50WrongNumericTypeException
      {
        return readIntNumericLeafAt(10);
      }
      
      public String getArrayName()
      {
        return readLengthPrefixedStringAt(10 + numericLeafLengthAt(10));
      }
      
      public short getClassCount()
      {
        typeSeek(2);
        return this$1.readShort();
      }
      
      public short getClassProperty()
      {
        typeSeek(4);
        return this$1.readShort();
      }
      
      public int getClassFieldList()
      {
        typeSeek(6);
        return this$1.readInt();
      }
      
      public DebugVC50TypeIterator getClassFieldListIterator()
      {
        int index = COFFFileParser.COFFFileImpl.COFFHeaderImpl.DebugVC50Impl.this.unbiasTypeIndex(getClassFieldList());
        int offset = parent.getTypeOffset(index);
        return new DebugVC50TypeIteratorImpl(COFFFileParser.COFFFileImpl.COFFHeaderImpl.DebugVC50Impl.this, parent, base, numTypes, index, offset);
      }
      
      public int getClassDerivationList()
      {
        typeSeek(10);
        return this$1.readInt();
      }
      
      public int getClassVShape()
      {
        typeSeek(14);
        return this$1.readInt();
      }
      
      public int getClassSize()
        throws DebugVC50WrongNumericTypeException
      {
        return readIntNumericLeafAt(18);
      }
      
      public String getClassName()
      {
        return readLengthPrefixedStringAt(18 + numericLeafLengthAt(18));
      }
      
      public short getUnionCount()
      {
        typeSeek(2);
        return this$1.readShort();
      }
      
      public short getUnionProperty()
      {
        typeSeek(4);
        return this$1.readShort();
      }
      
      public int getUnionFieldList()
      {
        typeSeek(6);
        return this$1.readInt();
      }
      
      public DebugVC50TypeIterator getUnionFieldListIterator()
      {
        int index = COFFFileParser.COFFFileImpl.COFFHeaderImpl.DebugVC50Impl.this.unbiasTypeIndex(getUnionFieldList());
        int offset = parent.getTypeOffset(index);
        return new DebugVC50TypeIteratorImpl(COFFFileParser.COFFFileImpl.COFFHeaderImpl.DebugVC50Impl.this, parent, base, numTypes, index, offset);
      }
      
      public int getUnionSize()
        throws DebugVC50WrongNumericTypeException
      {
        return readIntNumericLeafAt(10);
      }
      
      public String getUnionName()
      {
        return readLengthPrefixedStringAt(10 + numericLeafLengthAt(10));
      }
      
      public short getEnumCount()
      {
        typeSeek(2);
        return this$1.readShort();
      }
      
      public short getEnumProperty()
      {
        typeSeek(4);
        return this$1.readShort();
      }
      
      public int getEnumType()
      {
        typeSeek(6);
        return this$1.readInt();
      }
      
      public int getEnumFieldList()
      {
        typeSeek(10);
        return this$1.readInt();
      }
      
      public DebugVC50TypeIterator getEnumFieldListIterator()
      {
        int index = COFFFileParser.COFFFileImpl.COFFHeaderImpl.DebugVC50Impl.this.unbiasTypeIndex(getEnumFieldList());
        int offset = parent.getTypeOffset(index);
        return new DebugVC50TypeIteratorImpl(COFFFileParser.COFFFileImpl.COFFHeaderImpl.DebugVC50Impl.this, parent, base, numTypes, index, offset);
      }
      
      public String getEnumName()
      {
        return readLengthPrefixedStringAt(14);
      }
      
      public int getProcedureReturnType()
      {
        typeSeek(2);
        return this$1.readInt();
      }
      
      public byte getProcedureCallingConvention()
      {
        typeSeek(6);
        return this$1.readByte();
      }
      
      public short getProcedureNumberOfParameters()
      {
        typeSeek(8);
        return this$1.readShort();
      }
      
      public int getProcedureArgumentList()
      {
        typeSeek(10);
        return this$1.readInt();
      }
      
      public DebugVC50TypeIterator getProcedureArgumentListIterator()
      {
        int index = COFFFileParser.COFFFileImpl.COFFHeaderImpl.DebugVC50Impl.this.unbiasTypeIndex(getProcedureArgumentList());
        int offset = parent.getTypeOffset(index);
        return new DebugVC50TypeIteratorImpl(COFFFileParser.COFFFileImpl.COFFHeaderImpl.DebugVC50Impl.this, parent, base, numTypes, index, offset);
      }
      
      public int getMFunctionReturnType()
      {
        typeSeek(2);
        return this$1.readInt();
      }
      
      public int getMFunctionContainingClass()
      {
        typeSeek(6);
        return this$1.readInt();
      }
      
      public int getMFunctionThis()
      {
        typeSeek(10);
        return this$1.readInt();
      }
      
      public byte getMFunctionCallingConvention()
      {
        typeSeek(14);
        return this$1.readByte();
      }
      
      public short getMFunctionNumberOfParameters()
      {
        typeSeek(16);
        return this$1.readShort();
      }
      
      public int getMFunctionArgumentList()
      {
        typeSeek(18);
        return this$1.readInt();
      }
      
      public DebugVC50TypeIterator getMFunctionArgumentListIterator()
      {
        int index = COFFFileParser.COFFFileImpl.COFFHeaderImpl.DebugVC50Impl.this.unbiasTypeIndex(getMFunctionArgumentList());
        int offset = parent.getTypeOffset(index);
        return new DebugVC50TypeIteratorImpl(COFFFileParser.COFFFileImpl.COFFHeaderImpl.DebugVC50Impl.this, parent, base, numTypes, index, offset);
      }
      
      public int getMFunctionThisAdjust()
      {
        typeSeek(22);
        return this$1.readInt();
      }
      
      public short getVTShapeCount()
      {
        typeSeek(2);
        return this$1.readShort();
      }
      
      public int getVTShapeDescriptor(int i)
      {
        typeSeek(4 + i / 2);
        int val = this$1.readByte() & 0xFF;
        if (i % 2 != 0) {
          val >>= 4;
        }
        return val;
      }
      
      public int getBasicArrayType()
      {
        typeSeek(2);
        return this$1.readInt();
      }
      
      public short getLabelAddressMode()
      {
        typeSeek(2);
        return this$1.readShort();
      }
      
      public int getDimArrayType()
      {
        typeSeek(2);
        return this$1.readInt();
      }
      
      public int getDimArrayDimInfo()
      {
        typeSeek(6);
        return this$1.readInt();
      }
      
      public String getDimArrayName()
      {
        return readLengthPrefixedStringAt(10);
      }
      
      public int getVFTPathCount()
      {
        typeSeek(2);
        return this$1.readInt();
      }
      
      public int getVFTPathBase(int i)
      {
        typeSeek(6 + 4 * i);
        return this$1.readInt();
      }
      
      public int getSkipIndex()
      {
        typeSeek(2);
        return this$1.readInt();
      }
      
      public int getArgListCount()
      {
        typeSeek(2);
        return this$1.readInt();
      }
      
      public int getArgListType(int i)
      {
        typeSeek(6 + 4 * i);
        return this$1.readInt();
      }
      
      public int getDefaultArgType()
      {
        typeSeek(2);
        return this$1.readInt();
      }
      
      public String getDefaultArgExpression()
      {
        return readLengthPrefixedStringAt(6);
      }
      
      public int getDerivedCount()
      {
        typeSeek(2);
        return this$1.readInt();
      }
      
      public int getDerivedType(int i)
      {
        typeSeek(6);
        return this$1.readInt();
      }
      
      public int getBitfieldFieldType()
      {
        typeSeek(2);
        return this$1.readInt();
      }
      
      public byte getBitfieldLength()
      {
        typeSeek(6);
        return this$1.readByte();
      }
      
      public byte getBitfieldPosition()
      {
        typeSeek(7);
        return this$1.readByte();
      }
      
      public short getMListAttribute()
      {
        typeSeek(2);
        return this$1.readShort();
      }
      
      public int getMListLength()
      {
        return (getLength() - 6 - (isMListIntroducingVirtual() ? 4 : 0)) / 4;
      }
      
      public int getMListType(int i)
      {
        typeSeek(6 + 4 * i);
        return this$1.readInt();
      }
      
      public boolean isMListIntroducingVirtual()
      {
        return isIntroducingVirtual(getMListAttribute());
      }
      
      public int getMListVtabOffset()
      {
        typeSeek(6 + 4 * getMListLength());
        return this$1.readInt();
      }
      
      public DebugVC50SymbolIterator getRefSym()
      {
        typeSeek(2);
        int len = this$1.readShort() & 0xFFFF;
        return new COFFFileParser.COFFFileImpl.COFFHeaderImpl.DebugVC50Impl.DebugVC50SymbolIteratorImpl(COFFFileParser.COFFFileImpl.COFFHeaderImpl.DebugVC50Impl.this, typeStringOffset + 2, len);
      }
      
      public short getBClassAttribute()
      {
        typeSeek(2);
        return this$1.readShort();
      }
      
      public int getBClassType()
      {
        typeSeek(4);
        return this$1.readInt();
      }
      
      public int getBClassOffset()
        throws DebugVC50WrongNumericTypeException
      {
        return readIntNumericLeafAt(8);
      }
      
      public short getVBClassAttribute()
      {
        typeSeek(2);
        return this$1.readShort();
      }
      
      public int getVBClassBaseClassType()
      {
        typeSeek(4);
        return this$1.readInt();
      }
      
      public int getVBClassVirtualBaseClassType()
      {
        typeSeek(8);
        return this$1.readInt();
      }
      
      public int getVBClassVBPOff()
        throws DebugVC50WrongNumericTypeException
      {
        return readIntNumericLeafAt(12);
      }
      
      public int getVBClassVBOff()
        throws DebugVC50WrongNumericTypeException
      {
        return readIntNumericLeafAt(12 + numericLeafLengthAt(12));
      }
      
      public short getIVBClassAttribute()
      {
        typeSeek(2);
        return this$1.readShort();
      }
      
      public int getIVBClassBType()
      {
        typeSeek(4);
        return this$1.readInt();
      }
      
      public int getIVBClassVBPType()
      {
        typeSeek(8);
        return this$1.readInt();
      }
      
      public int getIVBClassVBPOff()
        throws DebugVC50WrongNumericTypeException
      {
        return readIntNumericLeafAt(12);
      }
      
      public int getIVBClassVBOff()
        throws DebugVC50WrongNumericTypeException
      {
        return readIntNumericLeafAt(12 + numericLeafLengthAt(12));
      }
      
      public short getEnumerateAttribute()
      {
        typeSeek(2);
        return this$1.readShort();
      }
      
      public long getEnumerateValue()
      {
        return readIntNumericLeafAt(4);
      }
      
      public String getEnumerateName()
      {
        return readLengthPrefixedStringAt(4 + numericLeafLengthAt(4));
      }
      
      public int getFriendFcnType()
      {
        typeSeek(4);
        return this$1.readInt();
      }
      
      public String getFriendFcnName()
      {
        return readLengthPrefixedStringAt(8);
      }
      
      public int getIndexValue()
      {
        typeSeek(4);
        return this$1.readInt();
      }
      
      public DebugVC50TypeIterator getIndexIterator()
      {
        int index = COFFFileParser.COFFFileImpl.COFFHeaderImpl.DebugVC50Impl.this.unbiasTypeIndex(getIndexValue());
        int offset = parent.getTypeOffset(index);
        return new DebugVC50TypeIteratorImpl(COFFFileParser.COFFFileImpl.COFFHeaderImpl.DebugVC50Impl.this, parent, base, numTypes, index, offset);
      }
      
      public short getMemberAttribute()
      {
        typeSeek(2);
        return this$1.readShort();
      }
      
      public int getMemberType()
      {
        typeSeek(4);
        return this$1.readInt();
      }
      
      public int getMemberOffset()
        throws DebugVC50WrongNumericTypeException
      {
        return readIntNumericLeafAt(8);
      }
      
      public String getMemberName()
      {
        return readLengthPrefixedStringAt(8 + numericLeafLengthAt(8));
      }
      
      public short getStaticAttribute()
      {
        typeSeek(2);
        return this$1.readShort();
      }
      
      public int getStaticType()
      {
        typeSeek(4);
        return this$1.readInt();
      }
      
      public String getStaticName()
      {
        return readLengthPrefixedStringAt(8);
      }
      
      public short getMethodCount()
      {
        typeSeek(2);
        return this$1.readShort();
      }
      
      public int getMethodList()
      {
        typeSeek(4);
        return this$1.readInt();
      }
      
      public String getMethodName()
      {
        return readLengthPrefixedStringAt(8);
      }
      
      public int getNestedType()
      {
        typeSeek(4);
        return this$1.readInt();
      }
      
      public String getNestedName()
      {
        return readLengthPrefixedStringAt(8);
      }
      
      public int getVFuncTabType()
      {
        typeSeek(4);
        return this$1.readInt();
      }
      
      public int getFriendClsType()
      {
        typeSeek(4);
        return this$1.readInt();
      }
      
      public short getOneMethodAttribute()
      {
        typeSeek(2);
        return this$1.readShort();
      }
      
      public int getOneMethodType()
      {
        typeSeek(4);
        return this$1.readInt();
      }
      
      public boolean isOneMethodIntroducingVirtual()
      {
        return isIntroducingVirtual(getOneMethodAttribute());
      }
      
      public int getOneMethodVBaseOff()
      {
        typeSeek(8);
        return this$1.readInt();
      }
      
      public String getOneMethodName()
      {
        int baseLen = 8 + (isOneMethodIntroducingVirtual() ? 4 : 0);
        return readLengthPrefixedStringAt(baseLen);
      }
      
      public int getVFuncOffType()
      {
        typeSeek(4);
        return this$1.readInt();
      }
      
      public int getVFuncOffOffset()
      {
        typeSeek(8);
        return this$1.readInt();
      }
      
      public short getNestedExAttribute()
      {
        typeSeek(2);
        return this$1.readShort();
      }
      
      public int getNestedExType()
      {
        typeSeek(4);
        return this$1.readInt();
      }
      
      public String getNestedExName()
      {
        return readLengthPrefixedStringAt(8);
      }
      
      public short getMemberModifyAttribute()
      {
        typeSeek(2);
        return this$1.readShort();
      }
      
      public int getMemberModifyType()
      {
        typeSeek(4);
        return this$1.readInt();
      }
      
      public String getMemberModifyName()
      {
        return readLengthPrefixedStringAt(8);
      }
      
      public short getNumericTypeAt(int byteOffset)
      {
        typeSeek(byteOffset);
        return this$1.readShort();
      }
      
      public int getNumericLengthAt(int byteOffset)
        throws DebugVC50WrongNumericTypeException
      {
        return numericLeafLengthAt(byteOffset);
      }
      
      public int getNumericIntAt(int byteOffset)
        throws DebugVC50WrongNumericTypeException
      {
        return readIntNumericLeafAt(byteOffset);
      }
      
      public long getNumericLongAt(int byteOffset)
        throws DebugVC50WrongNumericTypeException
      {
        throw new RuntimeException("Unimplemented");
      }
      
      public float getNumericFloatAt(int byteOffset)
        throws DebugVC50WrongNumericTypeException
      {
        throw new RuntimeException("Unimplemented");
      }
      
      public double getNumericDoubleAt(int byteOffset)
        throws DebugVC50WrongNumericTypeException
      {
        throw new RuntimeException("Unimplemented");
      }
      
      public byte[] getNumericDataAt(int byteOffset)
        throws DebugVC50WrongNumericTypeException
      {
        throw new RuntimeException("Unimplemented");
      }
      
      private void loadTypeRecord()
      {
        this$1.seek(typeRecordOffset);
        typeRecordSize = (this$1.readShort() & 0xFFFF);
        typeStringOffset = (typeRecordOffset + 2);
        loadTypeString();
      }
      
      private void loadTypeString()
      {
        this$1.seek(typeStringOffset);
        int lo = this$1.readByte() & 0xFF;
        if (lo >= 240)
        {
          typeStringLeaf = lo;
        }
        else
        {
          int hi = this$1.readByte() & 0xFF;
          typeStringLeaf = (hi << 8 | lo);
        }
      }
      
      private void typeSeek(int offset)
      {
        this$1.seek(typeStringOffset + offset);
      }
      
      private int typeStringLength()
      {
        if ((typeStringLeaf >= 240) && (typeStringLeaf <= 255)) {
          return typeStringLeaf - 240;
        }
        switch (typeStringLeaf)
        {
        case 4097: 
          return 8;
        case 4098: 
          int extraLen = 0;
          int attr = (getPointerAttributes() & 0x1F) >> 0;
          int mode = (getPointerAttributes() & 0xE0) >> 5;
          if (attr == 8) {
            extraLen = 4 + numericLeafLengthAt(typeStringOffset + 14);
          } else if ((mode == 2) || (mode == 3)) {
            extraLen = 6;
          }
          return 10 + extraLen;
        case 4099: 
          int temp = 10 + numericLeafLengthAt(10);
          return temp + lengthPrefixedStringLengthAt(temp);
        case 4100: 
        case 4101: 
          int temp = 18 + numericLeafLengthAt(18);
          return temp + lengthPrefixedStringLengthAt(temp);
        case 4102: 
          int temp = 10 + numericLeafLengthAt(10);
          return temp + lengthPrefixedStringLengthAt(temp);
        case 4103: 
          return 14 + lengthPrefixedStringLengthAt(14);
        case 4104: 
          return 14;
        case 4105: 
          return 26;
        case 10: 
          return 4 + (getVTShapeCount() + 1) / 2;
        case 12: 
        case 4106: 
          throw new COFFException("COBOL symbols unimplemented");
        case 4107: 
          return 6;
        case 14: 
          return 4;
        case 15: 
          return 2;
        case 16: 
          return 2;
        case 4108: 
          return 10 + lengthPrefixedStringLengthAt(10);
        case 4109: 
          return 6 + 4 * getVFTPathCount();
        case 4110: 
          return 14 + lengthPrefixedStringLengthAt(14);
        case 20: 
          return 6;
        case 4111: 
          throw new COFFException("OEM symbols unimplemented");
        case 22: 
          return 10 + lengthPrefixedStringLengthAt(10);
        case 4608: 
          return 6 + numericLeafLengthAt(6);
        case 4609: 
          return 6 + 4 * getArgListCount();
        case 4610: 
          return 6 + lengthPrefixedStringLengthAt(6);
        case 4611: 
          return 2;
        case 4612: 
          return 6 + 4 * getDerivedCount();
        case 4613: 
          return 8;
        case 4614: 
          return 6 + 4 * getMListLength() + (isMListIntroducingVirtual() ? 4 : 0);
        case 4615: 
        case 4616: 
        case 4617: 
        case 4618: 
          throw new COFFException("LF_DIMCONU, LF_DIMCONLU, LF_DIMVARU, and LF_DIMVARLU unsupported");
        case 524: 
          this$1.seek(typeStringOffset + 2);
          return 4 + this$1.readShort();
        case 5120: 
          return 8 + numericLeafLengthAt(8);
        case 5121: 
        case 5122: 
          int temp = 12 + numericLeafLengthAt(12);
          return temp + numericLeafLengthAt(temp);
        case 1027: 
          int temp = 4 + numericLeafLengthAt(4);
          return temp + lengthPrefixedStringLengthAt(temp);
        case 5123: 
          return 8 + lengthPrefixedStringLengthAt(8);
        case 5124: 
          return 8;
        case 5125: 
          int temp = 8 + numericLeafLengthAt(8);
          return temp + lengthPrefixedStringLengthAt(temp);
        case 5126: 
          return 8 + lengthPrefixedStringLengthAt(8);
        case 5127: 
          return 8 + lengthPrefixedStringLengthAt(8);
        case 5128: 
          return 8 + lengthPrefixedStringLengthAt(8);
        case 5129: 
          return 8;
        case 5130: 
          return 8;
        case 5131: 
          int baseLen = 8 + (isOneMethodIntroducingVirtual() ? 4 : 0);
          return baseLen + lengthPrefixedStringLengthAt(baseLen);
        case 5132: 
          return 12;
        case 5133: 
          return 8 + lengthPrefixedStringLengthAt(8);
        case 5134: 
          return 8 + lengthPrefixedStringLengthAt(8);
        case 32768: 
        case 32769: 
        case 32770: 
        case 32771: 
        case 32772: 
        case 32773: 
        case 32774: 
        case 32775: 
        case 32776: 
        case 32777: 
        case 32778: 
        case 32779: 
        case 32780: 
        case 32781: 
        case 32782: 
        case 32783: 
        case 32784: 
          throw new RuntimeException("Unexpected numeric leaf " + typeStringLeaf + "in type string");
        }
        throw new COFFException("Unrecognized leaf " + typeStringLeaf + " in type string at offset " + typeStringOffset);
      }
      
      private boolean isIntroducingVirtual(int mprop)
      {
        int masked = mprop & 0x1C;
        return (masked == 16) || (masked == 24);
      }
      
      private int numericLeafLengthAt(int offset)
      {
        return COFFFileParser.COFFFileImpl.COFFHeaderImpl.DebugVC50Impl.this.numericLeafLengthAt(typeStringOffset + offset);
      }
      
      private int readIntNumericLeafAt(int offset)
      {
        return COFFFileParser.COFFFileImpl.COFFHeaderImpl.DebugVC50Impl.this.readIntNumericLeafAt(typeStringOffset + offset);
      }
      
      private int lengthPrefixedStringLengthAt(int offset)
      {
        return COFFFileParser.COFFFileImpl.COFFHeaderImpl.DebugVC50Impl.this.lengthPrefixedStringLengthAt(typeStringOffset + offset);
      }
      
      private String readLengthPrefixedStringAt(int offset)
      {
        return COFFFileParser.COFFFileImpl.COFFHeaderImpl.DebugVC50Impl.this.readLengthPrefixedStringAt(typeStringOffset + offset);
      }
    }
    
    private int numericLeafLengthAt(int absoluteOffset)
      throws DebugVC50WrongNumericTypeException
    {
      this$1.seek(absoluteOffset);
      int leaf = this$1.readShort() & 0xFFFF;
      if (leaf < 32768) {
        return 2;
      }
      switch (leaf)
      {
      case 32768: 
        return 3;
      case 32769: 
      case 32770: 
        return 4;
      case 32771: 
      case 32772: 
        return 6;
      case 32773: 
        return 6;
      case 32774: 
        return 10;
      case 32775: 
        return 12;
      case 32776: 
        return 18;
      case 32777: 
      case 32778: 
        return 18;
      case 32779: 
        return 8;
      case 32780: 
        return 10;
      case 32781: 
        return 18;
      case 32782: 
        return 26;
      case 32783: 
        return 66;
      case 32784: 
        return 4 + readIntNumericLeafAt(absoluteOffset + 2);
      }
      throw new DebugVC50WrongNumericTypeException("Illegal numeric leaf index " + leaf + " at offset " + absoluteOffset);
    }
    
    private int readIntNumericLeafAt(int absoluteOffset)
      throws DebugVC50WrongNumericTypeException
    {
      this$1.seek(absoluteOffset);
      int leaf = this$1.readShort() & 0xFFFF;
      if (leaf < 32768) {
        return leaf;
      }
      switch (leaf)
      {
      case 32768: 
        return this$1.readByte() & 0xFF;
      case 32769: 
      case 32770: 
        return this$1.readShort() & 0xFFFF;
      case 32771: 
      case 32772: 
        return this$1.readInt();
      }
      throw new DebugVC50WrongNumericTypeException("Illegal numeric leaf index " + leaf);
    }
    
    private long readLongNumericLeafAt(int absoluteOffset)
      throws DebugVC50WrongNumericTypeException
    {
      this$1.seek(absoluteOffset);
      int leaf = this$1.readShort() & 0xFFFF;
      if (leaf < 32768) {
        return leaf;
      }
      switch (leaf)
      {
      case 32768: 
        return this$1.readByte() & 0xFF;
      case 32769: 
      case 32770: 
        return this$1.readShort() & 0xFFFF;
      case 32771: 
      case 32772: 
        return this$1.readInt() & 0xFFFFFFFF;
      case 32777: 
      case 32778: 
        return this$1.readLong();
      }
      throw new DebugVC50WrongNumericTypeException("Illegal numeric leaf index " + leaf);
    }
    
    private float readFloatNumericLeafAt(int absoluteOffset)
      throws DebugVC50WrongNumericTypeException
    {
      this$1.seek(absoluteOffset);
      int leaf = this$1.readShort() & 0xFFFF;
      if (leaf != 32773) {
        throw new DebugVC50WrongNumericTypeException("Illegal numeric leaf index " + leaf);
      }
      return this$1.readFloat();
    }
    
    private double readDoubleNumericLeafAt(int absoluteOffset)
      throws DebugVC50WrongNumericTypeException
    {
      this$1.seek(absoluteOffset);
      int leaf = this$1.readShort() & 0xFFFF;
      if (leaf != 32774) {
        throw new DebugVC50WrongNumericTypeException("Illegal numeric leaf index " + leaf);
      }
      return this$1.readDouble();
    }
    
    private int lengthPrefixedStringLengthAt(int absoluteOffset)
    {
      this$1.seek(absoluteOffset);
      int len = this$1.readByte() & 0xFF;
      return 1 + len;
    }
    
    private String readLengthPrefixedStringAt(int absoluteOffset)
    {
      this$1.seek(absoluteOffset);
      int len = this$1.readByte() & 0xFF;
      byte[] res = new byte[len];
      int numRead = this$1.readBytes(res);
      if (numRead != len) {
        throw new COFFException("Error reading length prefixed string in symbol at offset " + absoluteOffset);
      }
      try
      {
        return new String(res, "US-ASCII");
      }
      catch (UnsupportedEncodingException e)
      {
        throw new COFFException(e);
      }
    }
    
    private int unbiasTypeIndex(int index)
    {
      return index - 4096;
    }
    
    private int biasTypeIndex(int index)
    {
      return index + 4096;
    }
  }
  
  class SectionHeaderImpl
    implements SectionHeader
  {
    private String name;
    private int virtualSize;
    private int virtualAddress;
    private int sizeOfRawData;
    private int pointerToRawData;
    private int pointerToRelocations;
    private int pointerToLineNumbers;
    private short numberOfRelocations;
    private short numberOfLineNumbers;
    private int characteristics;
    private MemoizedObject[] relocations;
    private MemoizedObject[] lineNumbers;
    
    public SectionHeaderImpl(int offset)
      throws COFFException
    {
      this$1.seek(offset);
      
      byte[] tmpName = new byte[8];
      int numRead = this$1.readBytes(tmpName);
      if (numRead != 8) {
        throw new COFFException("Error reading name of section header at offset " + offset);
      }
      if (tmpName[0] == 47)
      {
        int index = 0;
        try
        {
          index = Integer.parseInt(new String(tmpName, 1, tmpName.length - 1, "US-ASCII"));
        }
        catch (NumberFormatException e)
        {
          throw new COFFException("Error parsing string table index of name of section header at offset " + offset);
        }
        catch (UnsupportedEncodingException e)
        {
          throw new COFFException(e);
        }
        name = getStringTable().get(index);
      }
      else
      {
        try
        {
          int length = 0;
          while ((length < tmpName.length) && (tmpName[length] != 0)) {
            length++;
          }
          name = new String(tmpName, 0, length, "US-ASCII");
        }
        catch (UnsupportedEncodingException e)
        {
          throw new COFFException(e);
        }
      }
      virtualSize = this$1.readInt();
      virtualAddress = this$1.readInt();
      sizeOfRawData = this$1.readInt();
      pointerToRawData = this$1.readInt();
      pointerToRelocations = this$1.readInt();
      pointerToLineNumbers = this$1.readInt();
      numberOfRelocations = this$1.readShort();
      numberOfLineNumbers = this$1.readShort();
      characteristics = this$1.readInt();
      
      relocations = new MemoizedObject[numberOfRelocations];
      for (int i = 0; i < numberOfRelocations; i++)
      {
        final int relocOffset = pointerToRelocations + i * 10;
        relocations[i = new MemoizedObject()
        {
          public Object computeValue()
          {
            return new COFFFileParser.COFFFileImpl.COFFHeaderImpl.COFFRelocationImpl(COFFFileParser.COFFFileImpl.COFFHeaderImpl.this, relocOffset);
          }
        };
      }
      lineNumbers = new MemoizedObject[numberOfLineNumbers];
      for (int i = 0; i < numberOfLineNumbers; i++)
      {
        final int lineNoOffset = pointerToLineNumbers + i * 6;
        lineNumbers[i = new MemoizedObject()
        {
          public Object computeValue()
          {
            return new COFFFileParser.COFFFileImpl.COFFHeaderImpl.COFFLineNumberImpl(COFFFileParser.COFFFileImpl.COFFHeaderImpl.this, lineNoOffset);
          }
        };
      }
    }
    
    public String getName()
    {
      return name;
    }
    
    public int getSize()
    {
      return virtualSize;
    }
    
    public int getVirtualAddress()
    {
      return virtualAddress;
    }
    
    public int getSizeOfRawData()
    {
      return sizeOfRawData;
    }
    
    public int getPointerToRawData()
    {
      return pointerToRawData;
    }
    
    public int getPointerToRelocations()
    {
      return pointerToRelocations;
    }
    
    public int getPointerToLineNumbers()
    {
      return pointerToLineNumbers;
    }
    
    public short getNumberOfRelocations()
    {
      return numberOfRelocations;
    }
    
    public short getNumberOfLineNumbers()
    {
      return numberOfLineNumbers;
    }
    
    public int getSectionFlags()
    {
      return characteristics;
    }
    
    public boolean hasSectionFlag(int flag)
    {
      return (characteristics & flag) != 0;
    }
    
    public COFFRelocation getCOFFRelocation(int index)
    {
      return (COFFRelocation)relocations[index].getValue();
    }
    
    public COFFLineNumber getCOFFLineNumber(int index)
    {
      return (COFFLineNumber)lineNumbers[index];
    }
  }
  
  class COFFSymbolImpl
    implements COFFSymbol, COFFSymbolConstants
  {
    private int offset;
    private String name;
    private int value;
    private short sectionNumber;
    private short type;
    private byte storageClass;
    private byte numberOfAuxSymbols;
    private MemoizedObject auxFunctionDefinitionRecord = new MemoizedObject()
    {
      public Object computeValue()
      {
        return new COFFFileParser.COFFFileImpl.COFFHeaderImpl.AuxFunctionDefinitionRecordImpl(COFFFileParser.COFFFileImpl.COFFHeaderImpl.this, offset + 18);
      }
    };
    private MemoizedObject auxBfEfRecord = new MemoizedObject()
    {
      public Object computeValue()
      {
        return new COFFFileParser.COFFFileImpl.COFFHeaderImpl.AuxBfEfRecordImpl(COFFFileParser.COFFFileImpl.COFFHeaderImpl.this, offset + 18);
      }
    };
    private MemoizedObject auxWeakExternalRecord = new MemoizedObject()
    {
      public Object computeValue()
      {
        return new COFFFileParser.COFFFileImpl.COFFHeaderImpl.AuxWeakExternalRecordImpl(COFFFileParser.COFFFileImpl.COFFHeaderImpl.this, offset + 18);
      }
    };
    private MemoizedObject auxFileRecord = new MemoizedObject()
    {
      public Object computeValue()
      {
        return new COFFFileParser.COFFFileImpl.COFFHeaderImpl.AuxFileRecordImpl(COFFFileParser.COFFFileImpl.COFFHeaderImpl.this, offset + 18);
      }
    };
    private MemoizedObject auxSectionDefinitionsRecord = new MemoizedObject()
    {
      public Object computeValue()
      {
        return new COFFFileParser.COFFFileImpl.COFFHeaderImpl.AuxSectionDefinitionsRecordImpl(COFFFileParser.COFFFileImpl.COFFHeaderImpl.this, offset + 18);
      }
    };
    
    public COFFSymbolImpl(int offset)
      throws COFFException
    {
      this.offset = offset;
      this$1.seek(offset);
      
      byte[] tmpName = new byte[8];
      int numRead = this$1.readBytes(tmpName);
      if (numRead != 8) {
        throw new COFFException("Error reading name of symbol at offset " + offset);
      }
      if ((tmpName[0] == 0) && (tmpName[1] == 0) && (tmpName[2] == 0) && (tmpName[3] == 0))
      {
        int stringOffset = tmpName[4] << 24 | tmpName[5] << 16 | tmpName[6] << 8 | tmpName[7];
        
        name = getStringTable().getAtOffset(stringOffset);
      }
      value = this$1.readInt();
      sectionNumber = this$1.readShort();
      type = this$1.readShort();
      storageClass = this$1.readByte();
      numberOfAuxSymbols = this$1.readByte();
    }
    
    public int getOffset()
    {
      return offset;
    }
    
    public String getName()
    {
      return name;
    }
    
    public int getValue()
    {
      return value;
    }
    
    public short getSectionNumber()
    {
      return sectionNumber;
    }
    
    public short getType()
    {
      return type;
    }
    
    public byte getStorageClass()
    {
      return storageClass;
    }
    
    public byte getNumberOfAuxSymbols()
    {
      return numberOfAuxSymbols;
    }
    
    public boolean isFunctionDefinition()
    {
      return (getStorageClass() == 2) && (getType() >>> 8 == 2) && (getSectionNumber() > 0);
    }
    
    public AuxFunctionDefinitionRecord getAuxFunctionDefinitionRecord()
    {
      return (AuxFunctionDefinitionRecord)auxFunctionDefinitionRecord.getValue();
    }
    
    public boolean isBfOrEfSymbol()
    {
      return ((getName().equals(".bf")) || (getName().equals(".ef"))) && (getStorageClass() == 101);
    }
    
    public AuxBfEfRecord getAuxBfEfRecord()
    {
      return (AuxBfEfRecord)auxBfEfRecord.getValue();
    }
    
    public boolean isWeakExternal()
    {
      return (getStorageClass() == 2) && (getSectionNumber() == 0) && (getValue() == 0);
    }
    
    public AuxWeakExternalRecord getAuxWeakExternalRecord()
    {
      return (AuxWeakExternalRecord)auxWeakExternalRecord.getValue();
    }
    
    public boolean isFile()
    {
      return (getName().equals(".file")) && (getStorageClass() == 103);
    }
    
    public AuxFileRecord getAuxFileRecord()
    {
      return (AuxFileRecord)auxFileRecord.getValue();
    }
    
    public boolean isSectionDefinition()
    {
      return (getName().charAt(0) == '.') && (getStorageClass() == 3);
    }
    
    public AuxSectionDefinitions
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