Class InstructHash

java.lang.Object
ghidra.program.model.correlate.InstructHash

public class InstructHash extends Object
This class is the container for hashing information about a particular instruction, including all the n-grams it is currently involved in within the HashStore.
  • Field Details

    • isMatched

      protected boolean isMatched
    • index

      protected int index
    • block

      protected Block block
    • instruction

      protected Instruction instruction
    • nGrams

      protected Hash[] nGrams
    • hashEntries

      protected Hashtable<Hash,HashEntry> hashEntries
  • Constructor Details

    • InstructHash

      public InstructHash(Instruction inst, Block bl, int ind)
      Build an (unmatched) Instruction, associating it with its position in the basic block
      Parameters:
      inst - is the underlying instruction
      bl - is the basic-block
      ind - is the index within the block
  • Method Details

    • getBlock

      public Block getBlock()
      Returns:
      the containing basic block
    • allUnknown

      public boolean allUnknown(int length)
      If the -length- instructions, starting with this, are all unmatched, return true;
      Parameters:
      length - is number of instructions to check
      Returns:
      true if all checked instructions are unmatched
    • clearSort

      protected void clearSort()
      Clear out structures associated with the main sort
    • clearNGrams

      protected void clearNGrams(int sz)
      Clear out the n-gram array to an uninitialized list
      Parameters:
      sz - is the size of the uninitialized list