sa-jdi

otspot/debugger/posix/elf/ELFFileParser$ELFFileImpl:readShort	()S
    //   94: putfield 15	sun/jvm/hotspot/debugger/posix/elf/ELFFileParser$ELFFileImpl$ELFHeaderImpl:num_ph	S
    //   97: aload_0
    //   98: aload_1
    //   99: invokevirtual 4	sun/jvm/hotspot/debugger/posix/elf/ELFFileParser$ELFFileImpl:readShort	()S
    //   102: putfield 16	sun/jvm/hotspot/debugger/posix/elf/ELFFileParser$ELFFileImpl$ELFHeaderImpl:sh_entry_size	S
    //   105: aload_0
    //   106: aload_1
    //   107: invokevirtual 4	sun/jvm/hotspot/debugger/posix/elf/ELFFileParser$ELFFileImpl:readShort	()S
    //   110: putfield 17	sun/jvm/hotspot/debugger/posix/elf/ELFFileParser$ELFFileImpl$ELFHeaderImpl:num_sh	S
    //   113: aload_0
    //   114: aload_1
    //   115: invokevirtual 4	sun/jvm/hotspot/debugger/posix/elf/ELFFileParser$ELFFileImpl:readShort	()S
    //   118: putfield 18	sun/jvm/hotspot/debugger/posix/elf/ELFFileParser$ELFFileImpl$ELFHeaderImpl:sh_string_ndx	S
    //   121: aload_0
    //   122: aload_0
    //   123: getfield 17	sun/jvm/hotspot/debugger/posix/elf/ELFFileParser$ELFFileImpl$ELFHeaderImpl:num_sh	S
    //   126: anewarray 19	sun/jvm/hotspot/utilities/memo/MemoizedObject
    //   129: putfield 20	sun/jvm/hotspot/debugger/posix/elf/ELFFileParser$ELFFileImpl$ELFHeaderImpl:sectionHeaders	[Lsun/jvm/hotspot/utilities/memo/MemoizedObject;
    //   132: iconst_0
    //   133: istore_2
    //   134: iload_2
    //   135: aload_0
    //   136: getfield 17	sun/jvm/hotspot/debugger/posix/elf/ELFFileParser$ELFFileImpl$ELFHeaderImpl:num_sh	S
    //   139: if_icmpge +38 -> 177
    //   142: aload_0
    //   143: getfield 11	sun/jvm/hotspot/debugger/posix/elf/ELFFileParser$ELFFileImpl$ELFHeaderImpl:sh_offset	I
    //   146: iload_2
    //   147: aload_0
    //   148: getfield 16	sun/jvm/hotspot/debugger/posix/elf/ELFFileParser$ELFFileImpl$ELFHeaderImpl:sh_entry_size	S
    //   151: imul
    //   152: iadd
    //   153: i2l
    //   154: lstore_3
    //   155: aload_0
    //   156: getfield 20	sun/jvm/hotspot/debugger/posix/elf/ELFFileParser$ELFFileImpl$ELFHeaderImpl:sectionHeaders	[Lsun/jvm/hotspot/utilities/memo/MemoizedObject;
    //   159: iload_2
    //   160: new 21	sun/jvm/hotspot/debugger/posix/elf/ELFFileParser$ELFFileImpl$ELFHeaderImpl$1
    //   163: dup
    //   164: aload_0
    //   165: aload_1
    //   166: lload_3
    //   167: invokespecial 22	sun/jvm/hotspot/debugger/posix/elf/ELFFileParser$ELFFileImpl$ELFHeaderImpl$1:<init>	(Lsun/jvm/hotspot/debugger/posix/elf/ELFFileParser$ELFFileImpl$ELFHeaderImpl;Lsun/jvm/hotspot/debugger/posix/elf/ELFFileParser$ELFFileImpl;J)V
    //   170: aastore
    //   171: iinc 2 1
    //   174: goto -40 -> 134
    //   177: return
    // Line number table:
    //   Java source line #164	-> byte code offset #0
    //   Java source line #110	-> byte code offset #9
    //   Java source line #165	-> byte code offset #17
    //   Java source line #166	-> byte code offset #25
    //   Java source line #167	-> byte code offset #33
    //   Java source line #168	-> byte code offset #41
    //   Java source line #169	-> byte code offset #49
    //   Java source line #170	-> byte code offset #57
    //   Java source line #171	-> byte code offset #65
    //   Java source line #172	-> byte code offset #73
    //   Java source line #173	-> byte code offset #81
    //   Java source line #174	-> byte code offset #89
    //   Java source line #175	-> byte code offset #97
    //   Java source line #176	-> byte code offset #105
    //   Java source line #177	-> byte code offset #113
    //   Java source line #180	-> byte code offset #121
    //   Java source line #181	-> byte code offset #132
    //   Java source line #182	-> byte code offset #142
    //   Java source line #184	-> byte code offset #155
    //   Java source line #181	-> byte code offset #171
    //   Java source line #202	-> byte code offset #177
    // Local variable table:
    //   start	length	slot	name	signature
    //   0	178	0	this	ELFHeaderImpl
    //   1	165	1	???	ELFFileParser.ELFFileImpl
    //   133	44	2	i	int
    //   154	13	3	sectionHeaderOffset	long
  }
  
  public short getFileType()
  {
    return file_type;
  }
  
  public short getArch()
  {
    return arch;
  }
  
  public short getSectionHeaderSize()
  {
    return sh_entry_size;
  }
  
  public short getNumberOfSectionHeaders()
  {
    return num_sh;
  }
  
  public ELFSectionHeader getSectionHeader(int index)
  {
    return (ELFSectionHeader)sectionHeaders[index].getValue();
  }
  
  public ELFStringTable getSectionHeaderStringTable()
  {
    return getSectionHeader(sh_string_ndx).getStringTable();
  }
  
  public ELFStringTable getStringTable()
  {
    return findStringTableWithName(".strtab");
  }
  
  public ELFStringTable getDynamicStringTable()
  {
    return findStringTableWithName(".dynstr");
  }
  
  private ELFStringTable findStringTableWithName(String tableName)
  {
    ELFSectionHeader sh = null;
    for (int i = 1; i < getNumberOfSectionHeaders(); i++)
    {
      sh = getSectionHeader(i);
      if (tableName.equals(sh.getName())) {
        return sh.getStringTable();
      }
    }
    return null;
  }
  
  public ELFHashTable getHashTable()
  {
    return null;
  }
  
  public ELFSectionHeader getSymbolTableSection()
  {
    if (symbolTableSection != null) {
      return symbolTableSection;
    }
    symbolTableSection = getSymbolTableSection(2);
    
    return symbolTableSection;
  }
  
  public ELFSectionHeader getDynamicSymbolTableSection()
  {
    if (dynamicSymbolTableSection != null) {
      return dynamicSymbolTableSection;
    }
    dynamicSymbolTableSection = getSymbolTableSection(11);
    
    return dynamicSymbolTableSection;
  }
  
  private ELFSectionHeader getSymbolTableSection(int type)
  {
    ELFSectionHeader sh = null;
    for (int i = 1; i < getNumberOfSectionHeaders(); i++)
    {
      sh = getSectionHeader(i);
      if (sh.getType() == type)
      {
        dynamicSymbolTableSection = sh;
        return sh;
      }
    }
    return null;
  }
  
  public ELFSymbol getELFSymbol(String symbolName)
  {
    if (symbolName == null) {
      return null;
    }
    ELFSymbol symbol = null;
    int numSymbols = 0;
    ELFSectionHeader sh = getDynamicSymbolTableSection();
    if (sh != null)
    {
      numSymbols = sh.getNumberOfSymbols();
      for (int i = 0; i < Math.ceil(numSymbols / 2); i++)
      {
        if (symbolName.equals((symbol = sh.getELFSymbol(i)).getName())) {
          return symbol;
        }
        if (symbolName.equals((symbol = sh.getELFSymbol(numSymbols - 1 - i)).getName())) {
          return symbol;
        }
      }
    }
    sh = getSymbolTableSection();
    if (sh != null)
    {
      numSymbols = sh.getNumberOfSymbols();
      for (int i = 0; i < Math.ceil(numSymbols / 2); i++)
      {
        if (symbolName.equals((symbol = sh.getELFSymbol(i)).getName())) {
          return symbol;
        }
        if (symbolName.equals((symbol = sh.getELFSymbol(numSymbols - 1 - i)).getName())) {
          return symbol;
        }
      }
    }
    return null;
  }
  
  public ELFSymbol getELFSymbol(long address)
  {
    ELFSymbol symbol = null;
    int numSymbols = 0;
    long value = 0L;
    
    ELFSectionHeader sh = getDynamicSymbolTableSection();
    if (sh != null)
    {
      numSymbols = sh.getNumberOfSymbols();
      for (int i = 0; i < numSymbols; i++)
      {
        symbol = sh.getELFSymbol(i);
        value = symbol.getValue();
        if ((address >= value) && (address < value + symbol.getSize())) {
          return symbol;
        }
      }
    }
    sh = getSymbolTableSection();
    if (sh != null)
    {
      numSymbols = sh.getNumberOfSymbols();
      for (int i = 0; i < numSymbols; i++)
      {
        symbol = sh.getELFSymbol(i);
        value = symbol.getValue();
        if ((address >= value) && (address < value + symbol.getSize())) {
          return symbol;
        }
      }
    }
    return null;
  }
}

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

import sun.jvm.hotspot.utilities.memo.MemoizedObject;

final class ELFFileParser$ELFFileImpl$ELFSectionHeaderImpl$1
  extends MemoizedObject
{
  private final ELFFileParser.ELFFileImpl.ELFSectionHeaderImpl this$2;
  
  ELFFileParser$ELFFileImpl$ELFSectionHeaderImpl$1(ELFFileParser.ELFFileImpl.ELFSectionHeaderImpl paramELFSectionHeaderImpl, ELFFileParser.ELFFileImpl paramELFFileImpl, int paramInt) {}
  
  public Object computeValue()
  {
    return new ELFFileParser.ELFFileImpl.ELFSymbolImpl(ELFFileParser.ELFFileImpl.ELFSectionHeaderImpl.access$200(this$2), val$symbolOffset, ELFFileParser.ELFFileImpl.ELFSectionHeaderImpl.access$100(this$2));
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.debugger.posix.elf.ELFFileParser.ELFFileImpl.ELFSectionHeaderImpl.1
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.debugger.posix.elf;

import sun.jvm.hotspot.utilities.memo.MemoizedObject;

final class ELFFileParser$ELFFileImpl$ELFSectionHeaderImpl$2
  extends MemoizedObject
{
  private final ELFFileParser.ELFFileImpl.ELFSectionHeaderImpl this$2;
  
  ELFFileParser$ELFFileImpl$ELFSectionHeaderImpl$2(ELFFileParser.ELFFileImpl.ELFSectionHeaderImpl paramELFSectionHeaderImpl, ELFFileParser.ELFFileImpl paramELFFileImpl, int paramInt1, int paramInt2) {}
  
  public Object computeValue()
  {
    return new ELFFileParser.ELFFileImpl.ELFStringTableImpl(ELFFileParser.ELFFileImpl.ELFSectionHeaderImpl.access$200(this$2), val$strTableOffset, val$strTableSize);
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.debugger.posix.elf.ELFFileParser.ELFFileImpl.ELFSectionHeaderImpl.2
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.debugger.posix.elf;

import sun.jvm.hotspot.utilities.memo.MemoizedObject;

final class ELFFileParser$ELFFileImpl$ELFSectionHeaderImpl$3
  extends MemoizedObject
{
  private final ELFFileParser.ELFFileImpl.ELFSectionHeaderImpl this$2;
  
  ELFFileParser$ELFFileImpl$ELFSectionHeaderImpl$3(ELFFileParser.ELFFileImpl.ELFSectionHeaderImpl paramELFSectionHeaderImpl, ELFFileParser.ELFFileImpl paramELFFileImpl, int paramInt1, int paramInt2) {}
  
  public Object computeValue()
  {
    return new ELFFileParser.ELFFileImpl.ELFHashTableImpl(ELFFileParser.ELFFileImpl.ELFSectionHeaderImpl.access$200(this$2), val$hashTableOffset, val$hashTableSize);
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.debugger.posix.elf.ELFFileParser.ELFFileImpl.ELFSectionHeaderImpl.3
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.debugger.posix.elf;

import sun.jvm.hotspot.utilities.memo.MemoizedObject;

class ELFFileParser$ELFFileImpl$ELFSectionHeaderImpl
  implements ELFSectionHeader
{
  private int name_ndx;
  private int type;
  private int flags;
  private int address;
  private int section_offset;
  private int size;
  private int link;
  private int info;
  private int address_alignment;
  private int entry_size;
  private MemoizedObject[] symbols;
  private MemoizedObject stringTable;
  private MemoizedObject hashTable;
  private final ELFFileParser.ELFFileImpl this$1;
  
  /* Error */
  ELFFileParser$ELFFileImpl$ELFSectionHeaderImpl(ELFFileParser.ELFFileImpl arg1, long offset)
    throws ELFException
  {
    // Byte code:
    //   0: aload_0
    //   1: aload_1
    //   2: putfield 1	sun/jvm/hotspot/debugger/posix/elf/ELFFileParser$ELFFileImpl$ELFSectionHeaderImpl:this$1	Lsun/jvm/hotspot/debugger/posix/elf/ELFFileParser$ELFFileImpl;
    //   5: aload_0
    //   6: invokespecial 3	java/lang/Object:<init>	()V
    //   9: aload_1
    //   10: lload_2
    //   11: invokevirtual 4	sun/jvm/hotspot/debugger/posix/elf/ELFFileParser$ELFFileImpl:seek	(J)V
    //   14: aload_0
    //   15: aload_1
    //   16: invokevirtual 5	sun/jvm/hotspot/debugger/posix/elf/ELFFileParser$ELFFileImpl:readInt	()I
    //   19: putfield 6	sun/jvm/hotspot/debugger/posix/elf/ELFFileParser$ELFFileImpl$ELFSectionHeaderImpl:name_ndx	I
    //   22: aload_0
    //   23: aload_1
    //   24: invokevirtual 5	sun/jvm/hotspot/debugger/posix/elf/ELFFileParser$ELFFileImpl:readInt	()I
    //   27: putfield 2	sun/jvm/hotspot/debugger/posix/elf/ELFFileParser$ELFFileImpl$ELFSectionHeaderImpl:type	I
    //   30: aload_0
    //   31: aload_1
    //   32: invokevirtual 5	sun/jvm/hotspot/debugger/posix/elf/ELFFileParser$ELFFileImpl:readInt	()I
    //   35: putfield 7	sun/jvm/hotspot/debugger/posix/elf/ELFFileParser$ELFFileImpl$ELFSectionHeaderImpl:flags	I
    //   38: aload_0
    //   39: aload_1
    //   40: invokevirtual 5	sun/jvm/hotspot/debugger/posix/elf/ELFFileParser$ELFFileImpl:readInt	()I
    //   43: putfield 8	sun/jvm/hotspot/debugger/posix/elf/ELFFileParser$ELFFileImpl$ELFSectionHeaderImpl:address	I
    //   46: aload_0
    //   47: aload_1
    //   48: invokevirtual 5	sun/jvm/hotspot/debugger/posix/elf/ELFFileParser$ELFFileImpl:readInt	()I
    //   51: putfield 9	sun/jvm/hotspot/debugger/posix/elf/ELFFileParser$ELFFileImpl$ELFSectionHeaderImpl:section_offset	I
    //   54: aload_0
    //   55: aload_1
    //   56: invokevirtual 5	sun/jvm/hotspot/debugger/posix/elf/ELFFileParser$ELFFileImpl:readInt	()I
    //   59: putfield 10	sun/jvm/hotspot/debugger/posix/elf/ELFFileParser$ELFFileImpl$ELFSectionHeaderImpl:size	I
    //   62: aload_0
    //   63: aload_1
    //   64: invokevirtual 5	sun/jvm/hotspot/debugger/posix/elf/ELFFileParser$ELFFileImpl:readInt	()I
    //   67: putfield 11	sun/jvm/hotspot/debugger/posix/elf/ELFFileParser$ELFFileImpl$ELFSectionHeaderImpl:link	I
    //   70: aload_0
    //   71: aload_1
    //   72: invokevirtual 5	sun/jvm/hotspot/debugger/posix/elf/ELFFileParser$ELFFileImpl:readInt	()I
    //   75: putfield 12	sun/jvm/hotspot/debugger/posix/elf/ELFFileParser$ELFFileImpl$ELFSectionHeaderImpl:info	I
    //   78: aload_0
    //   79: aload_1
    //   80: invokevirtual 5	sun/jvm/hotspot/debugger/posix/elf/ELFFileParser$ELFFileImpl:readInt	()I
    //   83: putfield 13	sun/jvm/hotspot/debugger/posix/elf/ELFFileParser$ELFFileImpl$ELFSectionHeaderImpl:address_alignment	I
    //   86: aload_0
    //   87: aload_1
    //   88: invokevirtual 5	sun/jvm/hotspot/debugger/posix/elf/ELFFileParser$ELFFileImpl:readInt	()I
    //   91: putfield 14	sun/jvm/hotspot/debugger/posix/elf/ELFFileParser$ELFFileImpl$ELFSectionHeaderImpl:entry_size	I
    //   94: aload_0
    //   95: getfield 2	sun/jvm/hotspot/debugger/posix/elf/ELFFileParser$ELFFileImpl$ELFSectionHeaderImpl:type	I
    //   98: tableswitch	default:+221->319, 0:+62->160, 1:+65->163, 2:+68->166, 3:+139->237, 4:+171->269, 5:+174->272, 6:+206->304, 7:+209->307, 8:+212->310, 9:+215->313, 10:+218->316, 11:+68->166
    //   160: goto +159 -> 319
    //   163: goto +156 -> 319
    //   166: aload_0
    //   167: getfield 10	sun/jvm/hotspot/debugger/posix/elf/ELFFileParser$ELFFileImpl$ELFSectionHeaderImpl:size	I
    //   170: aload_0
    //   171: getfield 14	sun/jvm/hotspot/debugger/posix/elf/ELFFileParser$ELFFileImpl$ELFSectionHeaderImpl:entry_size	I
    //   174: idiv
    //   175: istore 4
    //   177: aload_0
    //   178: iload 4
    //   180: anewarray 15	sun/jvm/hotspot/utilities/memo/MemoizedObject
    //   183: putfield 16	sun/jvm/hotspot/debugger/posix/elf/ELFFileParser$ELFFileImpl$ELFSectionHeaderImpl:symbols	[Lsun/jvm/hotspot/utilities/memo/MemoizedObject;
    //   186: iconst_0
    //   187: istore 5
    //   189: iload 5
    //   191: iload 4
    //   193: if_icmpge +41 -> 234
    //   196: aload_0
    //   197: getfield 9	sun/jvm/hotspot/debugger/posix/elf/ELFFileParser$ELFFileImpl$ELFSectionHeaderImpl:section_offset	I
    //   200: iload 5
    //   202: aload_0
    //   203: getfield 14	sun/jvm/hotspot/debugger/posix/elf/ELFFileParser$ELFFileImpl$ELFSectionHeaderImpl:entry_size	I
    //   206: imul
    //   207: iadd
    //   208: istore 6
    //   210: aload_0
    //   211: getfield 16	sun/jvm/hotspot/debugger/posix/elf/ELFFileParser$ELFFileImpl$ELFSectionHeaderImpl:symbols	[Lsun/jvm/hotspot/utilities/memo/MemoizedObject;
    //   214: iload 5
    //   216: new 17	sun/jvm/hotspot/debugger/posix/elf/ELFFileParser$ELFFileImpl$ELFSectionHeaderImpl$1
    //   219: dup
    //   220: aload_0
    //   221: aload_1
    //   222: iload 6
    //   224: invokespecial 18	sun/jvm/hotspot/debugger/posix/elf/ELFFileParser$ELFFileImpl$ELFSectionHeaderImpl$1:<init>	(Lsun/jvm/hotspot/debugger/posix/elf/ELFFileParser$ELFFileImpl$ELFSectionHeaderImpl;Lsun/jvm/hotspot/debugger/posix/elf/ELFFileParser$ELFFileImpl;I)V
    //   227: aastore
    //   228: iinc 5 1
    //   231: goto -42 -> 189
    //   234: goto +85 -> 319
    //   237: aload_0
    //   238: getfield 9	sun/jvm/hotspot/debugger/posix/elf/ELFFileParser$ELFFileImpl$ELFSectionHeaderImpl:section_offset	I
    //   241: istore 5
    //   243: aload_0
    //   244: getfield 10	sun/jvm/hotspot/debugger/posix/elf/ELFFileParser$ELFFileImpl$ELFSectionHeaderImpl:size	I
    //   247: istore 6
    //   249: aload_0
    //   250: new 19	sun/jvm/hotspot/debugger/posix/elf/ELFFileParser$ELFFileImpl$ELFSectionHeaderImpl$2
    //   253: dup
    //   254: aload_0
    //   255: aload_1
    //   256: iload 5
    //   258: iload 6
    //   260: invokespecial 20	sun/jvm/hotspot/debugger/posix/elf/ELFFileParser$ELFFileImpl$ELFSectionHeaderImpl$2:<init>	(Lsun/jvm/hotspot/debugger/posix/elf/ELFFileParser$ELFFileImpl$ELFSectionHeaderImpl;Lsun/jvm/hotspot/debugger/posix/elf/ELFFileParser$ELFFileImpl;II)V
    //   263: putfield 21	sun/jvm/hotspot/debugger/posix/elf/ELFFileParser$ELFFileImpl$ELFSectionHeaderImpl:stringTable	Lsun/jvm/hotspot/utilities/memo/MemoizedObject;
    //   266: goto +53 -> 319
    //   269: goto +50 -> 319
    //   272: aload_0
    //   273: getfield 9	sun/jvm/hotspot/debugger/posix/elf/ELFFileParser$ELFFileImpl$ELFSectionHeaderImpl:section_offset	I
    //   276: istore 7
    //   278: aload_0
    //   279: getfield 10	sun/jvm/hotspot/debugger/posix/elf/ELFFileParser$ELFFileImpl$ELFSectionHeaderImpl:size	I
    //   282: istore 8
    //   284: aload_0
    //   285: new 22	sun/jvm/hotspot/debugger/posix/elf/ELFFileParser$ELFFileImpl$ELFSectionHeaderImpl$3
    //   288: dup
    //   289: aload_0
    //   290: aload_1
    //   291: iload 7
    //   293: iload 8
    //   295: invokespecial 23	sun/jvm/hotspot/debugger/posix/elf/ELFFileParser$ELFFileImpl$ELFSectionHeaderImpl$3:<init>	(Lsun/jvm/hotspot/debugger/posix/elf/ELFFileParser$ELFFileImpl$ELFSectionHeaderImpl;Lsun/jvm/hotspot/debugger/posix/elf/ELFFileParser$ELFFileImpl;II)V
    //   298: putfield 24	sun/jvm/hotspot/debugger/posix/elf/ELFFileParser$ELFFileImpl$ELFSectionHeaderImpl:hashTable	Lsun/jvm/hotspot/utilities/memo/MemoizedObject;
    //   301: goto +18 -> 319
    //   304: goto +15 -> 319
    //   307: goto +12 -> 319
    //   310: goto +9 -> 319
    //   313: goto +6 -> 319
    //   316: goto +3 -> 319
    //   319: return
    // Line number table:
    //   Java source line #415	-> byte code offset #0
    //   Java source line #416	-> byte code offset #9
    //   Java source line #417	-> byte code offset #14
    //   Java source line #418	-> byte code offset #22
    //   Java source line #419	-> byte code offset #30
    //   Java source line #420	-> byte code offset #38
    //   Java source line #421	-> byte code offset #46
    //   Java source line #422	-> byte code offset #54
    //   Java source line #423	-> byte code offset #62
    //   Java source line #424	-> byte code offset #70
    //   Java source line #425	-> byte code offset #78
    //   Java source line #426	-> byte code offset #86
    //   Java source line #428	-> byte code offset #94
    //   Java source line #430	-> byte code offset #160
    //   Java source line #432	-> byte code offset #163
    //   Java source line #436	-> byte code offset #166
    //   Java source line #437	-> byte code offset #177
    //   Java source line #438	-> byte code offset #186
    //   Java source line #439	-> byte code offset #196
    //   Java source line #441	-> byte code offset #210
    //   Java source line #438	-> byte code offset #228
    //   Java source line #447	-> byte code offset #234
    //   Java source line #450	-> byte code offset #237
    //   Java source line #451	-> byte code offset #243
    //   Java source line #452	-> byte code offset #249
    //   Java source line #458	-> byte code offset #266
    //   Java source line #460	-> byte code offset #269
    //   Java source line #462	-> byte code offset #272
    //   Java source line #463	-> byte code offset #278
    //   Java source line #464	-> byte code offset #284
    //   Java source line #470	-> byte code offset #301
    //   Java source line #472	-> byte code offset #304
    //   Java source line #474	-> byte code offset #307
    //   Java source line #476	-> byte code offset #310
    //   Java source line #478	-> byte code offset #313
    //   Java source line #480	-> byte code offset #316
    //   Java source line #484	-> byte code offset #319
    // Local variable table:
    //   start	length	slot	name	signature
    //   0	320	0	this	ELFSectionHeaderImpl
    //   1	290	1	???	ELFFileParser.ELFFileImpl
    //   0	320	2	offset	long
    //   175	144	4	num_entries	int
    //   187	42	5	i	int
    //   241	16	5	strTableOffset	int
    //   208	15	6	symbolOffset	int
    //   247	12	6	strTableSize	int
    //   276	16	7	hashTableOffset	int
    //   282	12	8	hashTableSize	int
  }
  
  public int getType()
  {
    return type;
  }
  
  public int getNumberOfSymbols()
  {
    if (symbols != null) {
      return symbols.length;
    }
    return 0;
  }
  
  public ELFSymbol getELFSymbol(int index)
  {
    return (ELFSymbol)symbols[index].getValue();
  }
  
  public ELFStringTable getStringTable()
  {
    if (stringTable != null) {
      return (ELFStringTable)stringTable.getValue();
    }
    return null;
  }
  
  public ELFHashTable getHashTable()
  {
    if (hashTable != null) {
      return (ELFHashTable)hashTable.getValue();
    }
    return null;
  }
  
  public String getName()
  {
    if (name_ndx == 0) {
      return null;
    }
    ELFStringTable tbl = this$1.getHeader().getSectionHeaderStringTable();
    return tbl.get(name_ndx);
  }
  
  public int getLink()
  {
    return link;
  }
  
  public int getOffset()
  {
    return section_offset;
  }
}

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

class ELFFileParser$ELFFileImpl$ELFStringTableImpl
  implements ELFStringTable
{
  private byte[] data;
  private int numStrings;
  private final ELFFileParser.ELFFileImpl this$1;
  
  ELFFileParser$ELFFileImpl$ELFStringTableImpl(ELFFileParser.ELFFileImpl arg1, long offset, int length)
    throws ELFException
  {
    ???.seek(offset);
    data = new byte[length];
    int bytesRead = ???.readBytes(data);
    if (bytesRead != length) {
      throw new ELFException("Error reading string table (read " + bytesRead + "bytes, expected to " + "read " + data.length + "bytes).");
    }
    numStrings = 0;
    for (int ptr = 0; ptr < data.length; ptr++) {
      if (data[ptr] == 0) {
        numStrings += 1;
      }
    }
  }
  
  public String get(int index)
  {
    int startPtr = index;
    int endPtr = index;
    while (data[endPtr] != 0) {
      endPtr++;
    }
    return new String(data, startPtr, endPtr - startPtr);
  }
  
  public int getNumStrings()
  {
    return numStrings;
  }
}

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

class ELFFileParser$ELFFileImpl$ELFSymbolImpl
  implements ELFSymbol
{
  private int name_ndx;
  private int value;
  private int size;
  private byte info;
  private byte other;
  private short section_header_ndx;
  private int section_type;
  private long offset;
  private final ELFFileParser.ELFFileImpl this$1;
  
  ELFFileParser$ELFFileImpl$ELFSymbolImpl(ELFFileParser.ELFFileImpl paramELFFileImpl, long offset, int section_type)
    throws ELFException
  {
    paramELFFileImpl.seek(offset);
    this.offset = offset;
    name_ndx = paramELFFileImpl.readInt();
    value = paramELFFileImpl.readInt();
    size = paramELFFileImpl.readInt();
    info = paramELFFileImpl.readByte();
    other = paramELFFileImpl.readByte();
    section_header_ndx = paramELFFileImpl.readShort();
    
    this.section_type = section_type;
    switch (getType())
    {
    case 0: 
      break;
    case 1: 
      break;
    case 2: 
      break;
    case 3: 
      break;
    case 4: 
      break;
    case 13: 
      break;
    case 15: 
      break;
    }
  }
  
  public int getBinding()
  {
    return info >> 4;
  }
  
  public int getType()
  {
    return info & 0xF;
  }
  
  public long getOffset()
  {
    return offset;
  }
  
  public String getName()
  {
    if (name_ndx == 0) {
      return null;
    }
    String symbol_name = null;
    if (section_type == 2) {
      symbol_name = this$1.getHeader().getStringTable().get(name_ndx);
    } else if (section_type == 11) {
      symbol_name = this$1.getHeader().getDynamicStringTable().get(name_ndx);
    }
    return symbol_name;
  }
  
  public long getValue()
  {
    return value;
  }
  
  public int getSize()
  {
    return size;
  }
}

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

import java.io.IOException;
import java.util.Arrays;
import sun.jvm.hotspot.debugger.DataSource;
import sun.jvm.hotspot.utilities.memo.MemoizedObject;

class ELFFileParser$ELFFileImpl
  implements ELFFile
{
  private DataSource file;
  private ELFHeader header;
  private byte[] ident = new byte[16];
  private final ELFFileParser this$0;
  
  ELFFileParser$ELFFileImpl(ELFFileParser arg1, DataSource file)
    throws ELFException
  {
    this.file = file;
    int bytesRead = readBytes(ident);
    if (bytesRead != ident.length) {
      throw new ELFException("Error reading elf header (read " + bytesRead + "bytes, expected to " + "read " + ident.length + "bytes).");
    }
    if (!Arrays.equals(getMagicNumber(), ELF_MAGIC_NUMBER)) {
      throw new ELFException("Bad magic number for file.");
    }
    header = new ELFHeaderImpl();
  }
  
  public ELFHeader getHeader()
  {
    return header;
  }
  
  public byte[] getMagicNumber()
  {
    byte[] magicNumber = new byte[4];
    magicNumber[0] = ident[0];
    magicNumber[1] = ident[1];
    magicNumber[2] = ident[2];
    magicNumber[3] = ident[3];
    return magicNumber;
  }
  
  public byte getObjectSize()
  {
    return ident[4];
  }
  
  public byte getEncoding()
  {
    return ident[5];
  }
  
  public byte getVersion()
  {
    return ident[6];
  }
  
  class ELFHeaderImpl
    implements ELFHeader
  {
    private byte[] ident = new byte[16];
    private short file_type;
    private short arch;
    private int version;
    private int entry_point;
    private int ph_offset;
    private int sh_offset;
    private int flags;
    private short eh_size;
    private short ph_entry_size;
    private short num_ph;
    private short sh_entry_size;
    private short num_sh;
    private short sh_string_ndx;
    private MemoizedObject[] sectionHeaders;
    private MemoizedObject[] programHeaders;
    private ELFSectionHeader symbolTableSection;
    private ELFSectionHeader dynamicSymbolTableSection;
    private ELFHashTable hashTable;
    
    ELFHeaderImpl()
      throws ELFException
    {
      file_type = readShort();
      arch = readShort();
      version = readInt();
      entry_point = readInt();
      ph_offset = readInt();
      sh_offset = readInt();
      flags = readInt();
      eh_size = readShort();
      ph_entry_size = readShort();
      num_ph = readShort();
      sh_entry_size = readShort();
      num_sh = readShort();
      sh_string_ndx = readShort();
      
      sectionHeaders = new MemoizedObject[num_sh];
      for (int i = 0; i < num_sh; i++)
      {
        final long sectionHeaderOffset = sh_offset + i * sh_entry_size;
        
        sectionHeaders[i = new MemoizedObject()
        {
          public Object computeValue()
          {
            return new ELFFileParser.ELFFileImpl.ELFSectionHeaderImpl(ELFFileParser.ELFFileImpl.this, sectionHeaderOffset);
          }
        };
      }
    }
    
    public short getFileType()
    {
      return file_type;
    }
    
    public short getArch()
    {
      return arch;
    }
    
    public short getSectionHeaderSize()
    {
      return sh_entry_size;
    }
    
    public short getNumberOfSectionHeaders()
    {
      return num_sh;
    }
    
    public ELFSectionHeader getSectionHeader(int index)
    {
      return (ELFSectionHeader)sectionHeaders[index].getValue();
    }
    
    public ELFStringTable getSectionHeaderStringTable()
    {
      return getSectionHeader(sh_string_ndx).getStringTable();
    }
    
    public ELFStringTable getStringTable()
    {
      return findStringTableWithName(".strtab");
    }
    
    public ELFStringTable getDynamicStringTable()
    {
      return findStringTableWithName(".dynstr");
    }
    
    private ELFStringTable findStringTableWithName(String tableName)
    {
      ELFSectionHeader sh = null;
      for (int i = 1; i < getNumberOfSectionHeaders(); i++)
      {
        sh = getSectionHeader(i);
        if (tableName.equals(sh.getName())) {
          return sh.getStringTable();
        }
      }
      return null;
    }
    
    public ELFHashTable getHashTable()
    {
      return null;
    }
    
    public ELFSectionHeader getSymbolTableSection()
    {
      if (symbolTableSection != null) {
        return symbolTableSection;
      }
      symbolTableSection = getSymbolTableSection(2);
      
      return symbolTableSection;
    }
    
    public ELFSectionHeader getDynamicSymbolTableSection()
    {
      if (dynamicSymbolTableSection != null) {
        return dynamicSymbolTableSection;
      }
      dynamicSymbolTableSection = getSymbolTableSection(11);
      
      return dynamicSymbolTableSection;
    }
    
    private ELFSectionHeader getSymbolTableSection(int type)
    {
      ELFSectionHeader sh = null;
      for (int i = 1; i < getNumberOfSectionHeaders(); i++)
      {
        sh = getSectionHeader(i);
        if (sh.getType() == type)
        {
          dynamicSymbolTableSection = sh;
          return sh;
        }
      }
      return null;
    }
    
    public ELFSymbol getELFSymbol(String symbolName)
    {
      if (symbolName == null) {
        return null;
      }
      ELFSymbol symbol = null;
      int numSymbols = 0;
      ELFSectionHeader sh = getDynamicSymbolTableSection();
      if (sh != null)
      {
        numSymbols = sh.getNumberOfSymbols();
        for (int i = 0; i < Math.ceil(numSymbols / 2); i++)
        {
          if (symbolName.equals((symbol = sh.getELFSymbol(i)).getName())) {
            return symbol;
          }
          if (symbolName.equals((symbol = sh.getELFSymbol(numSymbols - 1 - i)).getName())) {
            return symbol;
          }
        }
      }
      sh = getSymbolTableSection();
      if (sh != null)
      {
        numSymbols = sh.getNumberOfSymbols();
        for (int i = 0; i < Math.ceil(numSymbols / 2); i++)
        {
          if (symbolName.equals((symbol = sh.getELFSymbol(i)).getName())) {
            return symbol;
          }
          if (symbolName.equals((symbol = sh.getELFSymbol(numSymbols - 1 - i)).getName())) {
            return symbol;
          }
        }
      }
      return null;
    }
    
    public ELFSymbol getELFSymbol(long address)
    {
      ELFSymbol symbol = null;
      int numSymbols = 0;
      long value = 0L;
      
      ELFSectionHeader sh = getDynamicSymbolTableSection();
      if (sh != null)
      {
        numSymbols = sh.getNumberOfSymbols();
        for (int i = 0; i < numSymbols; i++)
        {
          symbol = sh.getELFSymbol(i);
          value = symbol.getValue();
          if ((address >= value) && (address < value + symbol.getSize())) {
            return symbol;
          }
        }
      }
      sh = getSymbolTableSection();
      if (sh != null)
      {
        numSymbols = sh.getNumberOfSymbols();
        for (int i = 0; i < numSymbols; i++)
        {
          symbol = sh.getELFSymbol(i);
          value = symbol.getValue();
          if ((address >= value) && (address < value + symbol.getSize())) {
            return symbol;
          }
        }
      }
      return null;
    }
  }
  
  class ELFSectionHeaderImpl
    implements ELFSectionHeader
  {
    private int name_ndx;
    private int type;
    private int flags;
    private int address;
    private int section_offset;
    private int size;
    private int link;
    private int info;
    private int address_alignment;
    private int entry_size;
    private MemoizedObject[] symbols;
    private MemoizedObject stringTable;
    private MemoizedObject hashTable;
    
    ELFSectionHeaderImpl(long offset)
      throws ELFException
    {
      seek(offset);
      name_ndx = readInt();
      type = readInt();
      flags = readInt();
      address = readInt();
      section_offset = readInt();
      size = readInt();
      link = readInt();
      info = readInt();
      address_alignment = readInt();
      entry_size = readInt();
      int num_entries;
      switch (type)
      {
      case 0: 
        break;
      case 1: 
        break;
      case 2: 
      case 11: 
        num_entries = size / entry_size;
        symbols = new MemoizedObject[num_entries];
        for (int i = 0; i < num_entries; i++)
        {
          final int symbolOffset = section_offset + i * entry_size;
          
          symbols[i = new MemoizedObject()
          {
            public Object computeValue()
            {
              return new ELFFileParser.ELFFileImpl.ELFSymbolImpl(ELFFileParser.ELFFileImpl.this, symbolOffset, type);
            }
          };
        }
        break;
      case 3: 
        final int strTableOffset = section_offset;
        final int strTableSize = size;
        stringTable = new MemoizedObject()
        {
          public Object computeValue()
          {
            return new ELFFileParser.ELFFileImpl.ELFStringTableImpl(ELFFileParser.ELFFileImpl.this, strTableOffset, strTableSize);
          }
        };
        break;
      case 4: 
        break;
      case 5: 
        final int hashTableOffset = section_offset;
        final int hashTableSize = size;
        hashTable = new MemoizedObject()
        {
          public Object computeValue()
          {
            return new ELFFileParser.ELFFileImpl.ELFHashTableImpl(ELFFileParser.ELFFileImpl.this, hashTableOffset, hashTableSize);
          }
        };
        break;
      case 6: 
        break;
      case 7: 
        break;
      case 8: 
        break;
      case 9: 
        break;
      case 10: 
        break;
      }
    }
    
    public int getType()
    {
      return type;
    }
    
    public int getNumberOfSymbols()
    {
      if (symbols != null) {
        return symbols.length;
      }
      return 0;
    }
    
    public ELFSymbol getELFSymbol(int index)
    {
      return (ELFSymbol)symbols[index].getValue();
    }
    
    public ELFStringTable getStringTable()
    {
      if (stringTable != null) {
        return (ELFStringTable)stringTable.getValue();
      }
      return null;
    }
    
    public ELFHashTable getHashTable()
    {
      if (hashTable != null) {
        return (ELFHashTable)hashTable.getValue();
      }
      return null;
    }
    
    public String getName()
    {
      if (name_ndx == 0) {
        return null;
      }
      ELFStringTable tbl = getHeader().getSectionHeaderStringTable();
      return tbl.get(name_ndx);
    }
    
    public int getLink()
    {
      return link;
    }
    
    public int getOffset()
    {
      return section_offset;
    }
  }
  
  class ELFSymbolImpl
    implements ELFSymbol
  {
    private int name_ndx;
    private int value;
    private int size;
    private byte info;
    private byte other;
    private short section_header_ndx;
    private int section_type;
    private long offset;
    
    ELFSymbolImpl(long offset, int section_type)
      throws ELFException
    {
      seek(offset);
      this.offset = offset;
      name_ndx = readInt();
      value = readInt();
      size = readInt();
      info = readByte();
      other = readByte();
      section_header_ndx = readShort();
      
      this.section_type = section_type;
      switch (getType())
      {
      case 0: 
        break;
      case 1: 
        break;
      case 2: 
        break;
      case 3: 
        break;
      case 4: 
        break;
      case 13: 
        break;
      case 15: 
        break;
      }
    }
    
    public int getBinding()
    {
      return info >> 4;
    }
    
    public int getType()
    {
      return info & 0xF;
    }
    
    public long getOffset()
    {
      return offset;
    }
    
    public String getName()
    {
      if (name_ndx == 0) {
        return null;
      }
      String symbol_name = null;
      if (section_type == 2) {
        symbol_name = getHeader().getStringTable().get(name_ndx);
      } else if (section_type == 11) {
        symbol_name = getHeader().getDynamicStringTable().get(name_ndx);
      }
      return symbol_name;
    }
    
    public long getValue()
    {
      return value;
    }
    
    public int getSize()
    {
      return size;
    }
  }
  
  class ELFStringTableImpl
    implements ELFStringTable
  {
    private byte[] data;
    private int numStrings;
    
    ELFStringTableImpl(long offset, int length)
      throws ELFException
    {
      seek(offset);
      data = new byte[length];
      int bytesRead = readBytes(data);
      if (bytesRead != length) {
        throw new ELFException("Error reading string table (read " + bytesRead + "bytes, expected to " + "read " + data.length + "bytes).");
      }
      numStrings = 0;
      for (int ptr = 0; ptr < data.length; ptr++) {
        if (data[ptr] == 0) {
          numStrings += 1;
        }
      }
    }
    
    public String get(int index)
    {
      int startPtr = index;
      int endPtr = index;
      while (data[endPtr] != 0) {
        endPtr++;
      }
      return new String(data, startPtr, endPtr - startPtr);
    }
    
    public int getNumStrings()
    {
      return numStrings;
    }
  }
  
  class ELFHashTableImpl
    implements ELFHashTable
  {
    private int num_buckets;
    private int num_chains;
    private int[] buckets;
    private int[] chains;
    
    ELFHashTableImpl(long offset, int length)
      throws ELFException
    {
      seek(offset);
      num_buckets = readInt();
      num_chains = readInt();
      
      buckets = new int[num_buckets];
      chains = new int[num_chains];
      for (int i = 0; i < num_buckets; i++) {
        buckets[i] = readInt();
      }
      for (int i = 0; i < num_chains; i++) {
        chains[i] = readInt();
      }
      int actual = num_buckets * 4 + num_chains * 4 + 8;
      if (length != actual) {
        throw new ELFException("Error reading string table (read " + actual + "bytes, expected to " + "read " + length + "bytes).");
      }
    }
    
    public ELFSymbol getSymbol(String symbolName)
    {
      return null;
    }
  }
  
  public void close()
    throws ELFException
  {
    try
    {
      file.close();
    }
    catch (IOException e)
    {
      throw new ELFException(e);
    }
  }
  
  void seek(long offset)
    throws ELFException
  {
    try
    
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