Class OmfData
java.lang.Object
ghidra.app.util.bin.format.omf.OmfRecord
ghidra.app.util.bin.format.omf.omf.OmfData
- All Implemented Interfaces:
StructConverter
,Comparable<OmfData>
- Direct Known Subclasses:
OmfEnumeratedData
,OmfIteratedData
Object representing data loaded directly into the final image.
-
Field Summary
FieldsFields inherited from class ghidra.app.util.bin.format.omf.OmfRecord
checkSum, data, dataEnd, dataReader, recordLength, recordOffset, recordType
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
Compare datablocks by data offsetabstract byte[]
getByteArray
(BinaryReader reader) Create a byte array holding the data represented by this object.long
abstract int
int
abstract boolean
Methods inherited from class ghidra.app.util.bin.format.omf.OmfRecord
calcCheckSum, getData, getRecordChecksum, getRecordLength, getRecordOffset, getRecordType, hasBigFields, parseData, toDataType, toString, validCheckSum
-
Field Details
-
segmentIndex
-
dataOffset
-
-
Constructor Details
-
OmfData
- Throws:
IOException
-
-
Method Details
-
getSegmentIndex
public int getSegmentIndex()- Returns:
- get the segments index for this datablock
-
getDataOffset
public long getDataOffset()- Returns:
- the starting offset, within the loaded image, of this data
-
compareTo
Compare datablocks by data offset- Specified by:
compareTo
in interfaceComparable<OmfData>
- Returns:
- a value less than 0 for lower address, 0 for same address, or greater than 0 for higher address
-
getLength
public abstract int getLength()- Returns:
- the length of this data in bytes
-
getByteArray
Create a byte array holding the data represented by this object. The length of the byte array should exactly match the value returned by getLength()- Parameters:
reader
- is for pulling bytes directly from the binary image- Returns:
- allocated and filled byte array
- Throws:
IOException
- for problems accessing data through the reader
-
isAllZeroes
public abstract boolean isAllZeroes()- Returns:
- true if this is a block entirely of zeroes
-