Package ghidra.app.util.bin.format.omf
Class OmfData
java.lang.Object
ghidra.app.util.bin.format.omf.OmfRecord
ghidra.app.util.bin.format.omf.OmfData
- All Implemented Interfaces:
Comparable<OmfData>
- Direct Known Subclasses:
OmfEnumeratedData
,OmfIteratedData
Object representing data loaded directly into the final image.
-
Field Summary
Fields inherited from class ghidra.app.util.bin.format.omf.OmfRecord
ALIAS, BAKPAT, BLKDEF, BLKEND, CEXTDEF, checkSum, COMDAT, COMDEF, COMENT, DEBSYM, END, ENDREC, EXTDEF, FIXUPP, GRPDEF, LCOMDEF, LEDATA, LEXTDEF, LHEADR, LIBDIC, LIBHED, LIBLOC, LIBNAM, LIDATA, LINNUM, LINSYM, LLNAMES, LNAMES, LOCSYM, LPUBDEF, MODEND, NBKPAT, OVLDEF, PEDATA, PIDATA, PUBDEF, recordLength, recordOffset, recordType, REDATA, REGINT, RHEADR, RIDATA, SEGDEF, START, THEADR, TYPDEF, VENDEXT, VERNUM
-
Constructor Summary
-
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, getRecordLength, getRecordName, getRecordOffset, getRecordType, hasBigFields, readCheckSumByte, readIndex, readInt1Or2, readInt2Or4, readRecord, readRecordHeader, readString, toString, validCheckSum
-
Field Details
-
segmentIndex
protected int segmentIndex -
dataOffset
protected long dataOffset
-
-
Constructor Details
-
OmfData
public OmfData()
-
-
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
-