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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic final String
getRecordName
(int type, Class<?> recordTypesClass) Gets the name of the given record typestatic OmfIndex
readIndex
(BinaryReader reader) static Omf2or4
readInt2Or4
(BinaryReader reader, boolean isBig) readRecords
(AbstractOmfRecordFactory factory) Reads all therecords
associated with the givenAbstractOmfRecordFactory
static OmfString
readString
(BinaryReader reader) Read the OMF string format: 1-byte length, followed by that many ascii charactersstatic DataType
toOmfRecordDataType
(OmfRecord record, String name)
-
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
- ABinaryReader
positioned at the start of the string- Returns:
- the read OMF 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
DataType
for the given OMF record
-
readRecords
public static List<OmfRecord> readRecords(AbstractOmfRecordFactory factory) throws OmfException, IOException Reads all therecords
associated with the givenAbstractOmfRecordFactory
- Parameters:
factory
- TheAbstractOmfRecordFactory
- Returns:
- A
List
of readrecords
- Throws:
IOException
- if there was an IO-related errorOmfException
- if there was a problem with the OMF specification
-