Package ghidra.app.util.bin.format.omf
Class OmfRecord
- java.lang.Object
-
- ghidra.app.util.bin.format.omf.OmfRecord
-
- Direct Known Subclasses:
OmfCommentRecord,OmfEnumeratedData,OmfExternalSymbol,OmfFileHeader,OmfFixupRecord,OmfGroupRecord,OmfIteratedData,OmfLibraryRecord,OmfLineNumberRecord,OmfModuleEnd,OmfNamesRecord,OmfSegmentHeader,OmfSymbolRecord
public abstract class OmfRecord extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description protected bytecheckSumstatic byteCOMDEFstatic byteCOMENTstatic byteEXTDEFstatic byteFIXUPPstatic byteGRPDEFstatic byteLCOMDEFstatic byteLEDATAstatic byteLEXTDEFstatic byteLHEADRstatic byteLIDATAstatic byteLINNUMstatic byteLNAMESstatic byteLPUBDEFstatic byteMODENDstatic bytePUBDEFprotected intrecordLengthprotected byterecordTypestatic byteSEGDEFstatic byteTHEADR
-
Constructor Summary
Constructors Constructor Description OmfRecord()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description bytecalcCheckSum(BinaryReader reader)intgetRecordLength()bytegetRecordType()booleanhasBigFields()voidreadCheckSumByte(BinaryReader reader)static intreadIndex(BinaryReader reader)static intreadInt1Or2(BinaryReader reader, boolean isBig)static intreadInt2Or4(BinaryReader reader, boolean isBig)static OmfRecordreadRecord(BinaryReader reader)voidreadRecordHeader(BinaryReader reader)static java.lang.StringreadString(BinaryReader reader)Read the OMF string format, 1-byte length, followed by that many ascii charactersbooleanvalidCheckSum(BinaryReader reader)
-
-
-
Field Detail
-
THEADR
public static final byte THEADR
- See Also:
- Constant Field Values
-
LHEADR
public static final byte LHEADR
- See Also:
- Constant Field Values
-
COMENT
public static final byte COMENT
- See Also:
- Constant Field Values
-
MODEND
public static final byte MODEND
- See Also:
- Constant Field Values
-
EXTDEF
public static final byte EXTDEF
- See Also:
- Constant Field Values
-
PUBDEF
public static final byte PUBDEF
- See Also:
- Constant Field Values
-
LINNUM
public static final byte LINNUM
- See Also:
- Constant Field Values
-
LNAMES
public static final byte LNAMES
- See Also:
- Constant Field Values
-
SEGDEF
public static final byte SEGDEF
- See Also:
- Constant Field Values
-
GRPDEF
public static final byte GRPDEF
- See Also:
- Constant Field Values
-
FIXUPP
public static final byte FIXUPP
- See Also:
- Constant Field Values
-
LEDATA
public static final byte LEDATA
- See Also:
- Constant Field Values
-
LIDATA
public static final byte LIDATA
- See Also:
- Constant Field Values
-
COMDEF
public static final byte COMDEF
- See Also:
- Constant Field Values
-
LEXTDEF
public static final byte LEXTDEF
- See Also:
- Constant Field Values
-
LPUBDEF
public static final byte LPUBDEF
- See Also:
- Constant Field Values
-
LCOMDEF
public static final byte LCOMDEF
- See Also:
- Constant Field Values
-
recordType
protected byte recordType
-
recordLength
protected int recordLength
-
checkSum
protected byte checkSum
-
-
Method Detail
-
getRecordType
public byte getRecordType()
-
getRecordLength
public int getRecordLength()
-
readRecordHeader
public void readRecordHeader(BinaryReader reader) throws java.io.IOException
- Throws:
java.io.IOException
-
readCheckSumByte
public void readCheckSumByte(BinaryReader reader) throws java.io.IOException
- Throws:
java.io.IOException
-
calcCheckSum
public byte calcCheckSum(BinaryReader reader) throws java.io.IOException
- Throws:
java.io.IOException
-
validCheckSum
public boolean validCheckSum(BinaryReader reader) throws java.io.IOException
- Throws:
java.io.IOException
-
hasBigFields
public boolean hasBigFields()
-
readInt1Or2
public static int readInt1Or2(BinaryReader reader, boolean isBig) throws java.io.IOException
- Throws:
java.io.IOException
-
readInt2Or4
public static int readInt2Or4(BinaryReader reader, boolean isBig) throws java.io.IOException
- Throws:
java.io.IOException
-
readIndex
public static int readIndex(BinaryReader reader) throws java.io.IOException
- Throws:
java.io.IOException
-
readRecord
public static OmfRecord readRecord(BinaryReader reader) throws java.io.IOException, OmfException
- Throws:
java.io.IOExceptionOmfException
-
readString
public static java.lang.String readString(BinaryReader reader) throws java.io.IOException
Read the OMF string format, 1-byte length, followed by that many ascii characters- Parameters:
reader-- Returns:
- Throws:
java.io.IOException
-
-