Package ghidra.app.util.bin.format.omf
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
ChangeModifier 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 typeNEWstatic 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) NEWreadRecords(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) REMOVEDList<OmfRecord>readRecords(AbstractOmfRecordFactory factory) Removed
-
Field Details
-
CATEGORY_PATH
Data type category- See Also:
-
-
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 NEW
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
Gets the name of the given record type- Parameters:
type- The record typerecordTypesClass- The class that contains accessible OMF type fields- Returns:
- The name of the given record type
-
toOmfRecordDataType
- Parameters:
record- The OMF record to convertname- The name of the OMF record- Returns:
- A
DataTypefor the given OMF record
-
readRecords NEW
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
-