Package ghidra.app.util.bin.format.omf

# Class OmfRecord

java.lang.Object
ghidra.app.util.bin.format.omf.OmfRecord

Direct Known Subclasses:
  `OmfCommentRecord`, `OmfData`, `OmfExternalSymbol`, `OmfFileHeader`, `OmfFixupRecord`, `OmfGroupRecord`, `OmfLibraryRecord`, `OmfModuleEnd`, `OmfNamesRecord`, `OmfObsoleteRecord`, `OmfSegmentHeader`, `OmfSymbolRecord`, `OmfUnknownRecord`, `OmfUnsupportedRecord`

public abstract class OmfRecord extends Object

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final byte`
  `ALIAS`
  `static final byte`
  `BAKPAT`
  `static final byte`
  `BLKDEF`
  `static final byte`
  `BLKEND`
  `static final byte`
  `CEXTDEF`
  `protected byte`
  `checkSum`
  `static final byte`
  `COMDAT`
  `static final byte`
  `COMDEF`
  `static final byte`
  `COMENT`
  `static final byte`
  `DEBSYM`
  `static final byte`
  `END`
  `static final byte`
  `ENDREC`
  `static final byte`
  `EXTDEF`
  `static final byte`
  `FIXUPP`
  `static final byte`
  `GRPDEF`
  `static final byte`
  `LCOMDEF`
  `static final byte`
  `LEDATA`
  `static final byte`
  `LEXTDEF`
  `static final byte`
  `LHEADR`
  `static final byte`
  `LIBDIC`
  `static final byte`
  `LIBHED`
  `static final byte`
  `LIBLOC`
  `static final byte`
  `LIBNAM`
  `static final byte`
  `LIDATA`
  `static final byte`
  `LINNUM`
  `static final byte`
  `LINSYM`
  `static final byte`
  `LLNAMES`
  `static final byte`
  `LNAMES`
  `static final byte`
  `LOCSYM`
  `static final byte`
  `LPUBDEF`
  `static final byte`
  `MODEND`
  `static final byte`
  `NBKPAT`
  `static final byte`
  `OVLDEF`
  `static final byte`
  `PEDATA`
  `static final byte`
  `PIDATA`
  `static final byte`
  `PUBDEF`
  `protected int`
  `recordLength`
  `protected long`
  `recordOffset`
  `protected byte`
  `recordType`
  `static final byte`
  `REDATA`
  `static final byte`
  `REGINT`
  `static final byte`
  `RHEADR`
  `static final byte`
  `RIDATA`
  `static final byte`
  `SEGDEF`
  `static final byte`
  `START`
  `static final byte`
  `THEADR`
  `static final byte`
  `TYPDEF`
  `static final byte`
  `VENDEXT`
  `static final byte`
  `VERNUM`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `OmfRecord()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `byte`
  `calcCheckSum(BinaryReader reader)`
  `int`
  `getRecordLength()`
  `static final String`
  `getRecordName(int type)`
  Gets the name of the given record type
  `long`
  `getRecordOffset()`
  `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 String`
  `readString(BinaryReader reader)`
  Read the OMF string format: 1-byte length, followed by that many ascii characters
  `String`
  `toString()`
  `boolean`
  `validCheckSum(BinaryReader reader)`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Field Details

  - ### RHEADR

    public static final byte RHEADR
    See Also:
      - Constant Field Values

  - ### REGINT

    public static final byte REGINT
    See Also:
      - Constant Field Values

  - ### REDATA

    public static final byte REDATA
    See Also:
      - Constant Field Values

  - ### RIDATA

    public static final byte RIDATA
    See Also:
      - Constant Field Values

  - ### OVLDEF

    public static final byte OVLDEF
    See Also:
      - Constant Field Values

  - ### ENDREC

    public static final byte ENDREC
    See Also:
      - Constant Field Values

  - ### BLKDEF

    public static final byte BLKDEF
    See Also:
      - Constant Field Values

  - ### BLKEND

    public static final byte BLKEND
    See Also:
      - Constant Field Values

  - ### DEBSYM

    public static final byte DEBSYM
    See Also:
      - Constant Field Values

  - ### THEADR

    public static final byte THEADR
    See Also:
      - Constant Field Values

  - ### LHEADR

    public static final byte LHEADR
    See Also:
      - Constant Field Values

  - ### PEDATA

    public static final byte PEDATA
    See Also:
      - Constant Field Values

  - ### PIDATA

    public static final byte PIDATA
    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

  - ### TYPDEF

    public static final byte TYPDEF
    See Also:
      - Constant Field Values

  - ### PUBDEF

    public static final byte PUBDEF
    See Also:
      - Constant Field Values

  - ### LOCSYM

    public static final byte LOCSYM
    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

  - ### LIBHED

    public static final byte LIBHED
    See Also:
      - Constant Field Values

  - ### LIBNAM

    public static final byte LIBNAM
    See Also:
      - Constant Field Values

  - ### LIBLOC

    public static final byte LIBLOC
    See Also:
      - Constant Field Values

  - ### LIBDIC

    public static final byte LIBDIC
    See Also:
      - Constant Field Values

  - ### COMDEF

    public static final byte COMDEF
    See Also:
      - Constant Field Values

  - ### BAKPAT

    public static final byte BAKPAT
    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

  - ### CEXTDEF

    public static final byte CEXTDEF
    See Also:
      - Constant Field Values

  - ### COMDAT

    public static final byte COMDAT
    See Also:
      - Constant Field Values

  - ### LINSYM

    public static final byte LINSYM
    See Also:
      - Constant Field Values

  - ### ALIAS

    public static final byte ALIAS
    See Also:
      - Constant Field Values

  - ### NBKPAT

    public static final byte NBKPAT
    See Also:
      - Constant Field Values

  - ### LLNAMES

    public static final byte LLNAMES
    See Also:
      - Constant Field Values

  - ### VERNUM

    public static final byte VERNUM
    See Also:
      - Constant Field Values

  - ### VENDEXT

    public static final byte VENDEXT
    See Also:
      - Constant Field Values

  - ### START

    public static final byte START
    See Also:
      - Constant Field Values

  - ### END

    public static final byte END
    See Also:
      - Constant Field Values

  - ### recordType

    protected byte recordType

  - ### recordLength

    protected int recordLength

  - ### recordOffset

    protected long recordOffset

  - ### checkSum

    protected byte checkSum

- ## Constructor Details

  - ### OmfRecord

    public OmfRecord()

- ## Method Details

  - ### getRecordType

    public byte getRecordType()

  - ### getRecordLength

    public int getRecordLength()

  - ### getRecordOffset

    public long getRecordOffset()

  - ### readRecordHeader

    public void readRecordHeader(BinaryReader reader) throws IOException
    Throws:
      `IOException`

  - ### readCheckSumByte

    public void readCheckSumByte(BinaryReader reader) throws IOException
    Throws:
      `IOException`

  - ### calcCheckSum

    public byte calcCheckSum(BinaryReader reader) throws IOException
    Throws:
      `IOException`

  - ### validCheckSum

    public boolean validCheckSum(BinaryReader reader) throws IOException
    Throws:
      `IOException`

  - ### hasBigFields

    public boolean hasBigFields()

  - ### readInt1Or2

    public static int readInt1Or2(BinaryReader reader, boolean isBig) throws IOException
    Throws:
      `IOException`

  - ### readInt2Or4

    public static int readInt2Or4(BinaryReader reader, boolean isBig) throws IOException
    Throws:
      `IOException`

  - ### readIndex

    public static int readIndex(BinaryReader reader) throws IOException
    Throws:
      `IOException`

  - ### readRecord

    public static OmfRecord readRecord(BinaryReader reader) throws IOException, OmfException
    Throws:
      `IOException`
      `OmfException`

  - ### readString

    public static String readString(BinaryReader reader) throws IOException
    Read the OMF string format: 1-byte length, followed by that many ascii characters
    Parameters:
      `reader` - A `BinaryReader` positioned at the start of the string
    Returns:
      the read OMF string
    Throws:
      `IOException` - if an IO-related error occurred

  - ### getRecordName

    public static final String getRecordName(int type)
    Gets the name of the given record type
    Parameters:
      `type` - The record type
    Returns:
      The name of the given record type

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`