Class OmfUtils
java.lang.Object
ghidra.app.util.bin.format.omf.OmfUtils
Utility class for OMF-based file formats
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> Stream<T> filterRecords(List<OmfRecord> records, Class<T> classType) static final StringgetRecordName(int type, Class<?> recordTypesClass) Gets the name of the given record typestatic OmfStringreadBigString(BinaryReader reader) Read the OMF big string format: 2-byte length, followed by that many ascii charactersstatic OmfIndexreadIndex(BinaryReader reader) static Omf2or4readInt2Or4(BinaryReader reader, boolean isBig) readRecords(AbstractOmfRecordFactory factory, MessageLog log) Reads all therecordsassociated with the givenAbstractOmfRecordFactorystatic OmfStringreadString(BinaryReader reader) Read the OMF string format: 1-byte length, followed by that many ascii charactersstatic DataTypetoOmfRecordDataType(OmfRecord record, String name)
-
Field Details
-
CATEGORY_PATH
-
-
Constructor Details
-
OmfUtils
public OmfUtils()
-
-
Method Details
-
readInt2Or4
- Throws:
IOException
-
readIndex
- Throws:
IOException
-
readString
Read the OMF string format: 1-byte length, followed by that many ascii characters- Parameters:
reader- ABinaryReaderpositioned at the start of the string- Returns:
- the read OMF string
- Throws:
IOException- if an IO-related error occurred
-
readBigString
Read the OMF big string format: 2-byte length, followed by that many ascii characters- Parameters:
reader- ABinaryReaderpositioned at the start of the string- Returns:
- the read OMF big string
- Throws:
IOException- if an IO-related error occurred
-
getRecordName
-
toOmfRecordDataType
-
readRecords
public static List<OmfRecord> readRecords(AbstractOmfRecordFactory factory, MessageLog log) throws OmfException, IOException Reads all therecordsassociated with the givenAbstractOmfRecordFactory- Parameters:
factory- TheAbstractOmfRecordFactorylog- The log- Returns:
- A
Listof readrecords - Throws:
IOException- if there was an IO-related errorOmfException- if there was a problem with the OMF specification
-
filterRecords
-