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_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 TypeMethodDescriptionlong
Get the memory alignment within the segment.int
getFlags()
Get the flags for this segment or section.getName()
Retrieve the name of the segment or section.long
Get the file offset of the segment or section.long
Get the in-memory, base-relative address of the beginning of this segment or section.long
Get the file size of this segment or section.long
Get the in-memory size of this segment or section.void
setAlignment
(long alignment) void
setFlags
(int flags) void
void
setOffsetInFile
(long offsetInFile) void
setOffsetInMemory
(long offsetInMemory) void
setSizeInFile
(long sizeInFile) void
setSizeInMemory
(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:ISegmentInformation
Retrieve the name of the segment or section.- Specified by:
getName
in interfaceISegmentInformation
- Returns:
- the name, null if unsupported
-
setName
-
getOffsetInFile
public long getOffsetInFile()Description copied from interface:ISegmentInformation
Get the file offset of the segment or section.- Specified by:
getOffsetInFile
in interfaceISegmentInformation
- Returns:
- the file offset in bytes
-
setOffsetInFile
public void setOffsetInFile(long offsetInFile) -
getSizeInFile
public long getSizeInFile()Description copied from interface:ISegmentInformation
Get the file size of this segment or section.- Specified by:
getSizeInFile
in interfaceISegmentInformation
- Returns:
- the size in bytes
-
setSizeInFile
public void setSizeInFile(long sizeInFile) -
getOffsetInMemory
public long getOffsetInMemory()Description copied from interface:ISegmentInformation
Get 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:
getOffsetInMemory
in interfaceISegmentInformation
- Returns:
- the base-relative memory address in bytes
-
setOffsetInMemory
public void setOffsetInMemory(long offsetInMemory) -
getSizeInMemory
public long getSizeInMemory()Description copied from interface:ISegmentInformation
Get the in-memory size of this segment or section.- Specified by:
getSizeInMemory
in interfaceISegmentInformation
- Returns:
- the size in bytes
-
setSizeInMemory
public void setSizeInMemory(long sizeInMemory) -
getFlags
public int getFlags()Description copied from interface:ISegmentInformation
Get the flags for this segment or section.- Specified by:
getFlags
in interfaceISegmentInformation
- Returns:
- a combination of
FLAG_*
attributes
-
setFlags
public void setFlags(int flags) -
getAlignment
public long getAlignment()Description copied from interface:ISegmentInformation
Get the memory alignment within the segment.- Specified by:
getAlignment
in interfaceISegmentInformation
- Returns:
- the alignment in bytes
-
setAlignment
public void setAlignment(long alignment) -
toString
-