Class EquateSymbol

java.lang.Object
ghidra.program.model.pcode.HighSymbol
ghidra.program.model.pcode.EquateSymbol

public class EquateSymbol extends HighSymbol
  • Field Details

  • Constructor Details

    • EquateSymbol

      public EquateSymbol(HighFunction func)
    • EquateSymbol

      public EquateSymbol(long uniqueId, String nm, long val, HighFunction func, Address addr, long hash)
    • EquateSymbol

      public EquateSymbol(long uniqueId, int conv, long val, HighFunction func, Address addr, long hash)
  • Method Details

    • getValue

      public long getValue()
    • getConvert

      public int getConvert()
    • decode

      public void decode(Decoder decoder) throws DecoderException
      Description copied from class: HighSymbol
      Decode this symbol object and its associated mappings from the stream.
      Overrides:
      decode in class HighSymbol
      Parameters:
      decoder - is the stream decoder
      Throws:
      DecoderException - for invalid encodings
    • encode

      public void encode(Encoder encoder) throws IOException
      Description copied from class: HighSymbol
      Encode the symbol description as an element to the stream. This does NOT save the mappings.
      Overrides:
      encode in class HighSymbol
      Parameters:
      encoder - is the stream encoder
      Throws:
      IOException - for errors in the underlying stream
    • convertName

      public static int convertName(String nm, long val)
      Determine what format a given equate name is in. Integer format conversions are stored using an Equate object, where the name of the equate is the actual conversion String. So the only way to tell what kind of conversion is being performed is by examining the name of the equate. The format code of the conversion is returned, or if the name is not a conversion, FORMAT_DEFAULT is returned indicating a normal String equate.
      Parameters:
      nm - is the name of the equate
      val - is the value being equated
      Returns:
      the format code for the conversion or FORMAT_DEFAULT if not a conversion