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 byte
checkSum
static byte
COMDEF
static byte
COMENT
static byte
EXTDEF
static byte
FIXUPP
static byte
GRPDEF
static byte
LCOMDEF
static byte
LEDATA
static byte
LEXTDEF
static byte
LHEADR
static byte
LIDATA
static byte
LINNUM
static byte
LNAMES
static byte
LPUBDEF
static byte
MODEND
static byte
PUBDEF
protected int
recordLength
protected byte
recordType
static byte
SEGDEF
static byte
THEADR
-
Constructor Summary
Constructors Constructor Description OmfRecord()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description byte
calcCheckSum(BinaryReader reader)
int
getRecordLength()
byte
getRecordType()
boolean
hasBigFields()
void
readCheckSumByte(BinaryReader reader)
static int
readIndex(BinaryReader reader)
static int
readInt1Or2(BinaryReader reader, boolean isBig)
static int
readInt2Or4(BinaryReader reader, boolean isBig)
static OmfRecord
readRecord(BinaryReader reader)
void
readRecordHeader(BinaryReader reader)
static java.lang.String
readString(BinaryReader reader)
Read the OMF string format, 1-byte length, followed by that many ascii charactersboolean
validCheckSum(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.IOException
OmfException
-
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
-
-