Class SegmentInformation
java.lang.Object
com.pnfsoftware.jeb.core.units.codeobject.SegmentInformation
- All Implemented Interfaces:
ISegmentInformation
Standard implementation of the
ISegmentInformation interface for segments and sections.-
Field Summary
Fields inherited from interface com.pnfsoftware.jeb.core.units.codeobject.ISegmentInformation
FLAG_ALLOC_ON_WRITE, FLAG_EXECUTE, FLAG_INVALID, FLAG_READ, FLAG_RW, FLAG_RWX, FLAG_RX, FLAG_SYNTHETIC, FLAG_WRITE -
Constructor Summary
ConstructorsConstructorDescriptionSegmentInformation(SegmentInformation segment) SegmentInformation(String name, long offsetInFile, long sizeInFile, long offsetInMemory, long sizeInMemory, int flags) -
Method Summary
Modifier and TypeMethodDescriptionlongGet the memory alignment within the segment.intgetFlags()Get the flags for this segment or section.getName()Retrieve the name of the segment or section.longGet the file offset of the segment or section.longGet the in-memory, base-relative address of the beginning of this segment or section.longGet the file size of this segment or section.longGet the in-memory size of this segment or section.voidsetAlignment(long alignment) voidsetFlags(int flags) voidvoidsetOffsetInFile(long offsetInFile) voidsetOffsetInMemory(long offsetInMemory) voidsetSizeInFile(long sizeInFile) voidsetSizeInMemory(long sizeInMemory) toString()
-
Constructor Details
-
SegmentInformation
public SegmentInformation(String name, long offsetInFile, long sizeInFile, long offsetInMemory, long sizeInMemory, int flags) -
SegmentInformation
-
-
Method Details
-
getName
Description copied from interface:ISegmentInformationRetrieve the name of the segment or section.- Specified by:
getNamein interfaceISegmentInformation- Returns:
- the name, null if unsupported
-
setName
-
getOffsetInFile
public long getOffsetInFile()Description copied from interface:ISegmentInformationGet the file offset of the segment or section.- Specified by:
getOffsetInFilein interfaceISegmentInformation- Returns:
- the file offset in bytes
-
setOffsetInFile
public void setOffsetInFile(long offsetInFile) -
getSizeInFile
public long getSizeInFile()Description copied from interface:ISegmentInformationGet the file size of this segment or section.- Specified by:
getSizeInFilein interfaceISegmentInformation- Returns:
- the size in bytes
-
setSizeInFile
public void setSizeInFile(long sizeInFile) -
getOffsetInMemory
public long getOffsetInMemory()Description copied from interface:ISegmentInformationGet the in-memory, base-relative address of the beginning of this segment or section. If a base address is not known or cannot be determined, the offset is 0-relative, and therefore, considered absolute.- Specified by:
getOffsetInMemoryin interfaceISegmentInformation- Returns:
- the base-relative memory address in bytes
-
setOffsetInMemory
public void setOffsetInMemory(long offsetInMemory) -
getSizeInMemory
public long getSizeInMemory()Description copied from interface:ISegmentInformationGet the in-memory size of this segment or section.- Specified by:
getSizeInMemoryin interfaceISegmentInformation- Returns:
- the size in bytes
-
setSizeInMemory
public void setSizeInMemory(long sizeInMemory) -
getFlags
public int getFlags()Description copied from interface:ISegmentInformationGet the flags for this segment or section.- Specified by:
getFlagsin interfaceISegmentInformation- Returns:
- a combination of
FLAG_*attributes
-
setFlags
public void setFlags(int flags) -
getAlignment
public long getAlignment()Description copied from interface:ISegmentInformationGet the memory alignment within the segment.- Specified by:
getAlignmentin interfaceISegmentInformation- Returns:
- the alignment in bytes
-
setAlignment
public void setAlignment(long alignment) -
toString
-