Class ELF32FileReader
java.lang.Object
com.ibm.j9ddr.corereaders.elf.ELFFileReader
com.ibm.j9ddr.corereaders.elf.ELF32FileReader
-
Field Summary
Fields declared in class ELFFileReader
ARCH_AARCH64, ARCH_AMD64, ARCH_ARM, ARCH_IA32, ARCH_IA64, ARCH_PPC32, ARCH_PPC64, ARCH_RISCV64, ARCH_S390, AT_ENTRY, AT_HWCAP, AT_NULL, AT_PLATFORM, DT_DEBUG, DT_NULL, DT_SONAME, DT_STRTAB, EI_NIDENT, ELF_NOTE_HEADER_SIZE, ELF_PRARGSZ, ELFCLASS32, ELFCLASS64, ELFDATA2LSB, ELFDATA2MSB, ET_CORE, ET_DYN, ET_EXEC, ET_HIOS, ET_HIPROC, ET_LOOS, ET_LOPROC, ET_NONE, ET_NUM, ET_REL, is, NT_AUXV, NT_HGPRS, NT_PRPSINFO, NT_PRSTATUS, sourceNameModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final bytestatic final bytestatic final shortstatic final shortstatic final shortstatic final intstatic final intstatic final intstatic final intstatic final shortstatic final shortstatic final shortprotected ImageInputStreamstatic final intstatic final intstatic final intstatic final intprotected String -
Constructor Summary
ConstructorsConstructorDescriptionELF32FileReader(File file, ByteOrder byteOrder) ELF32FileReader(ImageInputStream in, long offset, long limit) -
Method Summary
Modifier and TypeMethodDescriptionprotected intprotected longpadToWordBoundary(long l) protected longprotected com.ibm.j9ddr.corereaders.elf.Addressprotected ProgramHeaderEntryprotected List<com.ibm.j9ddr.corereaders.elf.ELFSymbol> readSymbolsAt(com.ibm.j9ddr.corereaders.elf.SectionHeaderEntry entry) booleanvalidDump(byte[] data, long filesize) Methods declared in class ELFFileReader
canResolveAddress, close, getByteOrder, getDynamicTableEntry, getELFFileReader, getELFFileReader, getELFFileReaderWithOffset, getFile, getMachineType, getMemoryRanges, getProgramHeaderEntries, getProperties, getSectionHeaderEntries, getSectionHeaderStringTable, getSourceName, getStream, getSymbols, is64Bit, isCompatibleWith, isELF, isExecutable, isTruncated, readByte, readBytes, readFully, readInt, readLong, readShort, readSONAME, readString, sectionHeaderMapsToProgramHeader, seekModifier and TypeMethodDescriptionbooleancanResolveAddress(long address) Search the program header table to see whether it can successfully resolve an address into a file offset.voidclose()Search the program header table for the dynamic entry.static ELFFileReadergetELFFileReader(File file) static ELFFileReaderstatic ELFFileReadergetELFFileReaderWithOffset(ImageInputStream in, long offset, long limit) getFile()Returns the file from which this reader is reading.shortCollection<? extends IMemorySource> getMemoryRanges(long baseAddress, List<com.ibm.j9ddr.corereaders.elf.SectionHeaderEntry> sectionHeaderEntries, Map<Long, String> sectionHeaderStringTable) Iterate through the sections that were already loaded and create a list of memory source objects for them.List<? extends ProgramHeaderEntry> List<com.ibm.j9ddr.corereaders.elf.SectionHeaderEntry> Gets the data stream for this readergetSymbols(long baseAddress, boolean useUnallocatedSections) Obtain the symbols from a core reader, offset by baseAddress.booleanis64Bit()booleanisCompatibleWith(ELFFileReader otherReader) Perform a quick check on two ELF readers to see if they represent the same library. otherReader is the one we hope is better that this reader.static booleanisELF(byte[] signature) booleanExamine the ELF header to determine if this file is an executable or not.booleanAre any parts of the core file known to be missing?bytereadByte()byte[]readBytes(int len) voidreadFully(byte[] b, int off, int len) intreadInt()longreadLong()shortreadSONAME(ELFFileReader coreFileReader) Assume the entry given refers to a loaded library or program and find and return its name or null if it couldn't be determined.Reads a string from the readers current position until it is terminated by a null (0) byte.booleansectionHeaderMapsToProgramHeader(com.ibm.j9ddr.corereaders.elf.SectionHeaderEntry section) voidseek(long pos)
-
Constructor Details
-
ELF32FileReader
public ELF32FileReader(File file, ByteOrder byteOrder) throws IOException, InvalidDumpFormatException -
ELF32FileReader
public ELF32FileReader(ImageInputStream in, long offset, long limit) throws IOException, InvalidDumpFormatException
-
-
Method Details
-
validDump
public boolean validDump(byte[] data, long filesize) -
readProgramHeaderEntry
- Throws:
IOException
-
padToWordBoundary
protected long padToWordBoundary(long l) -
readElfWord
- Throws:
IOException
-
readElfWordAsAddress
- Throws:
IOException
-
addressSizeBits
protected int addressSizeBits() -
readSymbolsAt
protected List<com.ibm.j9ddr.corereaders.elf.ELFSymbol> readSymbolsAt(com.ibm.j9ddr.corereaders.elf.SectionHeaderEntry entry) throws IOException - Throws:
IOException
-